/**
 * TRAEXPO ERP — Portal (front-end) styling.
 *
 * Completely self-contained — unlike the wp-admin views, this can't
 * rely on WordPress's own admin CSS (.wrap, .button, .widefat aren't
 * loaded on the front end), so every class the Portal templates use is
 * defined here. Same brand palette as assets/css/admin.css, so the
 * Portal and the wp-admin screens still feel like one product.
 */

:root {
	--portal-primary: #015285;
	--portal-navy: #00406b;
	--portal-blue: #17a0fe;
	--portal-success: #1e8e3e;
	--portal-danger: #c0392b;
	--portal-bg: #f4f6f8;
	--portal-surface: #ffffff;
	--portal-border: #e1e5e9;
	--portal-text: #1d2327;
	--portal-text-muted: #6b7480;
	--portal-radius: 8px;
	--portal-sidebar-width: 220px;
}

* {
	box-sizing: border-box;
}

/*
 * Belt-and-suspenders backstop for the admin-bar suppression already
 * done in PHP (PortalController::maybe_hide_admin_bar()) — covers the
 * rare case of a caching layer serving a stale response that still
 * has the toolbar markup baked in for a given visitor.
 */
#wpadminbar {
	display: none !important;
}

html {
	margin-top: 0 !important;
}

body.traexpo-portal-body {
	margin: 0;
	background: var(--portal-bg);
	color: var(--portal-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------------------------------------------------------------
 * Login / access-denied / no-branch screens
 * ------------------------------------------------------------- */
.traexpo-portal-login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.traexpo-portal-login-card {
	background: var(--portal-surface);
	border-radius: var(--portal-radius);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	padding: 40px;
	width: 100%;
	max-width: 380px;
	text-align: center;
}

.traexpo-portal-login-title {
	margin: 0 0 4px;
	color: var(--portal-navy);
	font-size: 22px;
}

.traexpo-portal-login-subtitle {
	margin: 0 0 24px;
	color: var(--portal-text-muted);
	font-size: 14px;
}

.traexpo-portal-login-error {
	background: #fbe9e7;
	color: var(--portal-danger);
	border: 1px solid #f1c2bb;
	border-radius: var(--portal-radius);
	padding: 10px 14px;
	margin-bottom: 16px;
	font-size: 14px;
}

.traexpo-portal-login-form {
	text-align: left;
}

.traexpo-portal-field {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.traexpo-portal-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--portal-text);
}

.traexpo-portal-field input[type="text"],
.traexpo-portal-field input[type="password"] {
	padding: 10px 12px;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	font-size: 14px;
}

.traexpo-portal-field--checkbox label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
}

.traexpo-portal-field--checkbox input {
	width: auto;
}

.traexpo-portal-button {
	display: inline-block;
	border: none;
	border-radius: var(--portal-radius);
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}

.traexpo-portal-button--primary {
	background: var(--portal-primary);
	color: #fff;
}

.traexpo-portal-button--primary:hover {
	background: var(--portal-navy);
}

.traexpo-portal-button--block {
	display: block;
	width: 100%;
}

.traexpo-portal-login-footer {
	margin-top: 20px;
	font-size: 13px;
}

.traexpo-portal-login-footer a {
	color: var(--portal-primary);
	text-decoration: none;
}

/* ---------------------------------------------------------------
 * New split-screen login (traexpo-portal-auth-*) — access-denied.php
 * and no-branch.php deliberately still use the plain traexpo-portal-
 * login-* classes above; this is a separate, richer layout just for
 * the actual sign-in screen.
 * ------------------------------------------------------------- */
.traexpo-portal-auth-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(160deg, #001f36 0%, #002945 40%, #f4f6f8 40%, #f4f6f8 100%);
}

.traexpo-portal-auth-card {
	width: 100%;
	max-width: 1080px;
	min-height: 640px;
	display: grid;
	grid-template-columns: 1.15fr 1fr;
	background: var(--portal-surface);
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 30px 70px rgba(0, 20, 40, 0.35);
}

.traexpo-portal-auth-hero {
	position: relative;
	background: linear-gradient(160deg, var(--portal-navy) 0%, var(--portal-primary) 100%);
	color: #fff;
	padding: 48px 44px;
	display: flex;
	align-items: flex-start;
}

.traexpo-portal-auth-hero-content {
	width: 100%;
}

.traexpo-portal-auth-hero h1 {
	margin: 0 0 8px;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.15;
}

.traexpo-portal-auth-tagline {
	margin: 0 0 28px;
	color: rgba(255, 255, 255, 0.8);
	font-size: 14px;
	max-width: 320px;
}

.traexpo-portal-auth-modules {
	display: flex;
	gap: 22px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.traexpo-portal-auth-module {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: rgba(255, 255, 255, 0.92);
}

.traexpo-portal-auth-module svg {
	width: 26px;
	height: 26px;
}

.traexpo-portal-auth-module span {
	font-size: 11px;
	font-weight: 600;
}

.traexpo-portal-auth-scene {
	margin: 4px 0 28px;
	border-radius: 14px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.12);
}

.traexpo-portal-auth-scene-svg {
	display: block;
	width: 100%;
	height: auto;
}

.traexpo-portal-auth-features {
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: rgba(0, 0, 0, 0.18);
	border-radius: 14px;
	padding: 18px 20px;
}

.traexpo-portal-auth-feature {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.traexpo-portal-auth-feature svg {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	margin-top: 2px;
	color: var(--portal-blue);
}

.traexpo-portal-auth-feature strong {
	display: block;
	font-size: 13px;
}

.traexpo-portal-auth-feature span {
	display: block;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.75);
}

.traexpo-portal-auth-form-panel {
	padding: 48px 44px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.traexpo-portal-auth-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 28px;
}

.traexpo-portal-auth-logo-image {
	max-height: 44px;
	max-width: 220px;
	object-fit: contain;
}

.traexpo-portal-auth-logo-fallback {
	display: inline-flex;
	color: var(--portal-primary);
}

.traexpo-portal-auth-logo-fallback svg {
	width: 32px;
	height: 32px;
}

.traexpo-portal-auth-logo-text {
	font-size: 18px;
	font-weight: 800;
	color: var(--portal-navy);
}

.traexpo-portal-auth-welcome {
	margin: 0 0 4px;
	font-size: 24px;
	color: var(--portal-navy);
}

.traexpo-portal-auth-subtitle {
	margin: 0 0 22px;
	color: var(--portal-text-muted);
	font-size: 14px;
}

.traexpo-portal-auth-error {
	background: #fbe9e7;
	color: var(--portal-danger);
	border: 1px solid #f1c2bb;
	border-radius: var(--portal-radius);
	padding: 10px 14px;
	margin-bottom: 18px;
	font-size: 13px;
}

.traexpo-portal-auth-field {
	margin-bottom: 18px;
}

.traexpo-portal-auth-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--portal-text);
	margin-bottom: 6px;
}

.traexpo-portal-auth-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
}

.traexpo-portal-auth-input-wrap svg:first-child {
	position: absolute;
	left: 14px;
	width: 18px;
	height: 18px;
	color: var(--portal-text-muted);
	pointer-events: none;
	z-index: 1;
}

.traexpo-portal-auth-input-wrap input {
	width: 100%;
	padding: 12px 14px 12px 42px;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	font-size: 14px;
}

.traexpo-portal-auth-input-wrap--has-toggle input {
	padding-right: 46px;
}

.traexpo-portal-auth-input-wrap input:focus {
	outline: none;
	border-color: var(--portal-primary);
	box-shadow: 0 0 0 3px rgba(1, 82, 133, 0.12);
}

.traexpo-portal-auth-eye {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	border: none;
	background: none;
	margin: 0;
	padding: 6px;
	cursor: pointer;
	color: var(--portal-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	border-radius: 6px;
	z-index: 2;
}

.traexpo-portal-auth-eye:hover {
	background: var(--portal-bg);
}

.traexpo-portal-auth-eye svg {
	width: 18px;
	height: 18px;
}

.traexpo-portal-auth-eye.is-visible {
	color: var(--portal-primary);
}

.traexpo-portal-auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 22px;
	font-size: 13px;
}

.traexpo-portal-auth-remember {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--portal-text);
}

.traexpo-portal-auth-remember input {
	width: auto;
}

.traexpo-portal-auth-row a {
	color: var(--portal-primary);
	text-decoration: none;
}

.traexpo-portal-auth-row a:hover {
	text-decoration: underline;
}

.traexpo-portal-auth-submit {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: var(--portal-primary);
	color: #fff;
	border: none;
	border-radius: var(--portal-radius);
	padding: 13px 18px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.traexpo-portal-auth-submit svg {
	width: 18px;
	height: 18px;
}

.traexpo-portal-auth-submit:hover {
	background: var(--portal-navy);
}

.traexpo-portal-auth-copyright {
	margin: 24px 0 0;
	text-align: center;
	font-size: 12px;
	color: var(--portal-text-muted);
}

@media (max-width: 900px) {
	.traexpo-portal-auth-card {
		grid-template-columns: 1fr;
		max-width: 460px;
	}

	.traexpo-portal-auth-hero {
		padding: 36px 28px;
	}

	.traexpo-portal-auth-scene,
	.traexpo-portal-auth-features {
		display: none;
	}

	.traexpo-portal-auth-form-panel {
		padding: 36px 28px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.traexpo-portal-auth-card {
		animation: traexpo-auth-fade-in 0.35s ease-out;
	}
}

@keyframes traexpo-auth-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------------------------------------------------------------
 * App shell (sidebar + topbar + content)
 * ------------------------------------------------------------- */
.traexpo-portal-app {
	display: flex;
	min-height: 100vh;
}

.traexpo-portal-sidebar {
	width: var(--portal-sidebar-width);
	flex-shrink: 0;
	background: var(--portal-navy);
	color: #fff;
	display: flex;
	flex-direction: column;
}

.traexpo-portal-brand {
	padding: 20px;
	font-weight: 700;
	font-size: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.traexpo-portal-nav {
	display: flex;
	flex-direction: column;
	padding: 12px 0;
}

.traexpo-portal-nav-group-block {
	border-bottom: 1px solid transparent;
}

.traexpo-portal-nav-group-toggle {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: none;
	border: none;
	cursor: pointer;
	padding: 14px 20px 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: rgba(255, 255, 255, 0.45);
}

.traexpo-portal-nav-group-toggle:hover {
	color: rgba(255, 255, 255, 0.7);
}

.traexpo-portal-nav-group-arrow {
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid rgba(255, 255, 255, 0.45);
	transition: transform 0.15s ease;
}

.traexpo-portal-nav-group-block.is-expanded .traexpo-portal-nav-group-arrow {
	transform: rotate(-180deg);
}

.traexpo-portal-nav-group-items {
	display: none;
	flex-direction: column;
}

.traexpo-portal-nav-group-block.is-expanded .traexpo-portal-nav-group-items {
	display: flex;
}

.traexpo-portal-nav-link {
	color: rgba(255, 255, 255, 0.8);
	text-decoration: none;
	padding: 12px 20px;
	font-size: 14px;
}

.traexpo-portal-nav-link:hover {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}

.traexpo-portal-nav-link.is-active {
	background: var(--portal-primary);
	color: #fff;
	font-weight: 600;
}

.traexpo-portal-main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.traexpo-portal-topbar {
	background: var(--portal-surface);
	border-bottom: 1px solid var(--portal-border);
	padding: 14px 24px;
	display: flex;
	align-items: center;
	gap: 16px;
}

.traexpo-portal-nav-toggle {
	display: none;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
}

.traexpo-portal-topbar-spacer {
	flex: 1;
}

.traexpo-portal-user-name {
	font-size: 14px;
	color: var(--portal-text-muted);
}

.traexpo-portal-logout-link {
	color: var(--portal-primary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.traexpo-portal-content {
	padding: 24px;
	flex: 1;
}

/*
 * Safety net: every text/date/select/textarea control anywhere inside
 * the Portal gets this base styling, not only ones wrapped in
 * .traexpo-field. This is the second time a form control that lived
 * outside that wrapper (the Accounting branch switcher, the date-range
 * filter) turned up completely unstyled — rather than patch each one
 * as it's found, this rule means a future bare `<select>` or `<input>`
 * anywhere in the Portal looks reasonable by default even if whoever
 * wrote that template forgot to add .traexpo-field.
 */
.traexpo-portal-content input[type="text"],
.traexpo-portal-content input[type="email"],
.traexpo-portal-content input[type="password"],
.traexpo-portal-content input[type="number"],
.traexpo-portal-content input[type="date"],
.traexpo-portal-content input[type="tel"],
.traexpo-portal-content select,
.traexpo-portal-content textarea {
	padding: 8px 12px;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	font-size: 14px;
	font-family: inherit;
	color: var(--portal-text);
	background: var(--portal-surface);
}

.traexpo-portal-content input[type="date"] {
	color-scheme: light;
}

.traexpo-portal-content input:focus,
.traexpo-portal-content select:focus,
.traexpo-portal-content textarea:focus {
	outline: none;
	border-color: var(--portal-primary);
	box-shadow: 0 0 0 3px rgba(1, 82, 133, 0.12);
}

.traexpo-accounting-branch-switcher select,
.traexpo-date-filter input,
.traexpo-accounting-branch-switcher label,
.traexpo-date-filter label {
	vertical-align: middle;
}

.traexpo-portal-page-title {
	margin: 0 0 20px;
	color: var(--portal-navy);
}

/* ---------------------------------------------------------------
 * Shared card / table / grid primitives
 * ------------------------------------------------------------- */
.traexpo-portal-card {
	background: var(--portal-surface);
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	padding: 20px;
	margin-bottom: 20px;
}

.traexpo-portal-summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin-bottom: 20px;
}

.traexpo-portal-card--metric {
	margin-bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.traexpo-portal-card-label {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--portal-text-muted);
}

.traexpo-portal-card-value {
	font-size: 26px;
	font-weight: 700;
}

.traexpo-portal-card--positive .traexpo-portal-card-value {
	color: var(--portal-success);
}

.traexpo-portal-card--negative .traexpo-portal-card-value {
	color: var(--portal-danger);
}

.traexpo-portal-table {
	width: 100%;
	border-collapse: collapse;
}

.traexpo-portal-table th,
.traexpo-portal-table td {
	text-align: left;
	padding: 10px 8px;
	border-bottom: 1px solid var(--portal-border);
	font-size: 14px;
}

.traexpo-portal-table th {
	color: var(--portal-text-muted);
	font-size: 12px;
	text-transform: uppercase;
}

.traexpo-portal-empty-state {
	color: var(--portal-text-muted);
	font-style: italic;
}

/* ---------------------------------------------------------------
 * Compatibility layer for shared AJAX-rendered HTML
 * ------------------------------------------------------------- */
/*
 * Several AJAX handlers (Passenger, Agent, Supplier, Visa, Payment...)
 * are reused UNCHANGED between wp-admin and the Portal (see
 * PortalController's docblock) — their server-rendered row HTML uses
 * a handful of WordPress admin-native class names (.button,
 * .button-small, .widefat) that don't exist on the front end by
 * default. Defining them here, once, means every module's Portal phase
 * can keep reusing that same server-rendered HTML with zero changes,
 * rather than each phase re-deriving its own button styling.
 */
.button {
	display: inline-block;
	background: var(--portal-surface);
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
	color: var(--portal-text);
}

.button:hover {
	border-color: var(--portal-primary);
	color: var(--portal-primary);
}

.button-primary {
	background: var(--portal-primary);
	border-color: var(--portal-primary);
	color: #fff;
}

.button-primary:hover {
	background: var(--portal-navy);
	color: #fff;
}

.button-small {
	padding: 4px 10px;
	font-size: 12px;
}

.widefat {
	width: 100%;
	border-collapse: collapse;
}

.widefat th,
.widefat td {
	text-align: left;
	padding: 10px 8px;
	border-bottom: 1px solid var(--portal-border);
	font-size: 14px;
}

.widefat th {
	color: var(--portal-text-muted);
	font-size: 12px;
	text-transform: uppercase;
}

.traexpo-empty-state {
	color: var(--portal-text-muted);
	font-style: italic;
	padding: 16px 0;
}

.traexpo-pagination {
	display: flex;
	gap: 6px;
	margin-top: 12px;
}

.traexpo-pagination button {
	border: 1px solid var(--portal-border);
	background: var(--portal-surface);
	border-radius: 4px;
	padding: 4px 10px;
	cursor: pointer;
	font-size: 13px;
}

.traexpo-pagination button.is-active {
	background: var(--portal-primary);
	color: #fff;
	border-color: var(--portal-primary);
}

.traexpo-list-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.traexpo-list-filters {
	display: flex;
	gap: 12px;
	margin-bottom: 16px;
}

.traexpo-list-filters input[type="text"],
.traexpo-list-filters select {
	padding: 8px 10px;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	font-size: 14px;
}

.traexpo-form-message {
	padding: 10px 14px;
	border-radius: var(--portal-radius);
	margin-bottom: 16px;
	font-size: 14px;
}

.traexpo-form-message.is-success {
	background: #e6f4ea;
	color: var(--portal-success);
	border: 1px solid #b7dfc2;
}

.traexpo-form-message.is-error {
	background: #fbe9e7;
	color: var(--portal-danger);
	border: 1px solid #f1c2bb;
}

.traexpo-field-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 16px;
}

/*
 * Base field styling — referenced by every form template across the
 * Portal (Passengers, Agents, Suppliers, Visas, Payments, Settings...)
 * since Phase 2, but never actually defined until now. Without this,
 * every form on the Portal fell back to bare browser-default input
 * styling with labels and fields both just flowing inline, which is
 * exactly the "doesn't look good" bug this fixes — everywhere at once,
 * since every form shares this one stylesheet.
 */
.traexpo-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 16px;
}

.traexpo-field-grid > .traexpo-field {
	margin-bottom: 0;
}

.traexpo-field label {
	font-size: 13px;
	font-weight: 600;
	color: var(--portal-text);
}

.traexpo-field input[type="text"],
.traexpo-field input[type="email"],
.traexpo-field input[type="password"],
.traexpo-field input[type="number"],
.traexpo-field input[type="date"],
.traexpo-field input[type="tel"],
.traexpo-field select,
.traexpo-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	font-size: 14px;
	font-family: inherit;
	color: var(--portal-text);
	background: var(--portal-surface);
}

.traexpo-field input:focus,
.traexpo-field select:focus,
.traexpo-field textarea:focus {
	outline: none;
	border-color: var(--portal-primary);
	box-shadow: 0 0 0 3px rgba(1, 82, 133, 0.12);
}

.traexpo-field textarea {
	resize: vertical;
	min-height: 70px;
}

.traexpo-field-hint {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--portal-text-muted);
}

.traexpo-portal-card h2 {
	margin: 0 0 16px;
	font-size: 18px;
	color: var(--portal-navy);
	padding-bottom: 10px;
	border-bottom: 1px solid var(--portal-border);
}

.traexpo-portal-card h2:not(:first-child) {
	margin-top: 8px;
}

.traexpo-portal-card h3 {
	margin: 20px 0 12px;
	font-size: 15px;
	color: var(--portal-navy);
}

.traexpo-portal-card textarea,
.traexpo-portal-card input[type="text"],
.traexpo-portal-card input[type="email"],
.traexpo-portal-card input[type="date"],
.traexpo-portal-card select {
	font-family: inherit;
}

.traexpo-required {
	color: var(--portal-danger);
}

.traexpo-typeahead-wrap {
	position: relative;
}

.traexpo-typeahead-list {
	position: absolute;
	z-index: 20;
	background: #fff;
	width: 100%;
	max-width: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.traexpo-search-results {
	list-style: none;
	margin: 12px 0;
	padding: 0;
	max-width: 480px;
	border: 1px solid var(--portal-border);
	border-radius: var(--portal-radius);
	overflow: hidden;
}

.traexpo-search-results:empty {
	border: none;
}

.traexpo-search-results li {
	border-bottom: 1px solid var(--portal-border);
}

.traexpo-search-results li:last-child {
	border-bottom: none;
}

.traexpo-search-results li.traexpo-empty-state {
	padding: 10px 14px;
}

.traexpo-search-results a {
	display: block;
	padding: 10px 14px;
	text-decoration: none;
	color: var(--portal-text);
}

.traexpo-search-results a:hover {
	background: var(--portal-bg);
	color: var(--portal-primary);
}

.traexpo-quick-post-types {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.traexpo-quick-post-type {
	position: relative;
	display: block;
	padding: 14px 18px;
	border: 2px solid var(--portal-border);
	border-radius: var(--portal-radius);
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	color: var(--portal-text);
	flex: 1 1 200px;
	text-align: center;
}

.traexpo-quick-post-type input[type="radio"] {
	position: absolute;
	opacity: 0;
}

.traexpo-quick-post-type:has(input:checked) {
	border-color: var(--portal-primary);
	background: var(--portal-bg);
	color: var(--portal-primary);
}

.traexpo-work-experience-row {
	margin-bottom: 8px;
}

.traexpo-work-experience-row hr {
	border: none;
	border-top: 1px solid var(--portal-border);
	margin: 16px 0;
}

.traexpo-work-experience-row:last-child hr {
	display: none;
}

#traexpo-add-work-experience {
	margin-bottom: 20px;
}

.traexpo-back-link {
	display: inline-block;
	margin-bottom: 16px;
	color: var(--portal-primary);
	text-decoration: none;
	font-size: 14px;
}

.traexpo-form-actions {
	margin-top: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.traexpo-status-pill {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: var(--portal-border);
}

.traexpo-status-processing,
.traexpo-status-submitted {
	background: #fff4e0;
	color: #9a6400;
}

.traexpo-status-approved {
	background: #e3f0ff;
	color: var(--portal-navy);
}

.traexpo-status-issued {
	background: #e6f4ea;
	color: var(--portal-success);
}

.traexpo-party-kind-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 8px 20px;
	text-align: left;
}

.traexpo-party-kind-label {
	margin: 0;
	white-space: nowrap;
	text-align: left;
}

.traexpo-party-kind-options {
	display: flex;
	flex-direction: row;
	justify-content: flex-start;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.traexpo-party-kind-options .traexpo-checkbox-row {
	padding: 0;
	margin: 0;
}

.traexpo-report-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 10px 0;
	font-size: 13px;
	color: var(--portal-text-muted);
}

.traexpo-report-legend-item {
	display: flex;
	align-items: center;
	gap: 6px;
}

.traexpo-report-legend-swatch {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 2px;
}

.traexpo-report-legend-swatch.traexpo-balance-receivable {
	background: var(--portal-success);
}

.traexpo-report-legend-swatch.traexpo-balance-payable {
	background: var(--portal-danger);
}

.traexpo-quick-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.traexpo-quick-link {
	border: none;
	font-weight: 600;
}

.traexpo-quick-link--passenger {
	background: #e6f0fb;
	color: #0b5fb3;
}

.traexpo-quick-link--passenger:hover {
	background: #d3e6fa;
}

.traexpo-quick-link--visa {
	background: #f1e9fb;
	color: #6b3fa0;
}

.traexpo-quick-link--visa:hover {
	background: #e5d7f7;
}

.traexpo-quick-link--accounting {
	background: #e6f4ea;
	color: #1e7e34;
}

.traexpo-quick-link--accounting:hover {
	background: #d3ecda;
}

.traexpo-quick-link--reports {
	background: #fff4e5;
	color: #a35a00;
}

.traexpo-quick-link--reports:hover {
	background: #ffe9c9;
}

/* ---------------------------------------------------------------
 * Redesigned Dashboard
 * ------------------------------------------------------------- */
.traexpo-dash-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.traexpo-dash-date {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	color: var(--portal-text-muted);
	font-size: 13px;
}

.traexpo-dash-date strong {
	color: var(--portal-navy);
	font-size: 15px;
}

.traexpo-dash-stat-grid {
	display: grid;
	gap: 14px;
	margin-bottom: 20px;
}

.traexpo-dash-stat-grid--primary {
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.traexpo-dash-stat-grid--finance {
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.traexpo-dash-stat {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	border-radius: var(--portal-radius);
	border: 1px solid var(--portal-border);
	background: #fff;
}

.traexpo-dash-stat-icon {
	width: 44px;
	height: 44px;
	min-width: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
}

.traexpo-dash-stat--purple .traexpo-dash-stat-icon { background: #f1e9fb; }
.traexpo-dash-stat--green .traexpo-dash-stat-icon { background: #e6f4ea; }
.traexpo-dash-stat--amber .traexpo-dash-stat-icon { background: #fff4e5; }
.traexpo-dash-stat--blue .traexpo-dash-stat-icon { background: #e6f0fb; }

.traexpo-dash-stat-label {
	display: block;
	font-size: 12.5px;
	color: var(--portal-text-muted);
	margin-bottom: 2px;
}

.traexpo-dash-stat-value {
	display: block;
	font-size: 20px;
	font-weight: 700;
	color: var(--portal-navy);
}

.traexpo-dash-finance-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-radius: var(--portal-radius);
	border: 1px solid var(--portal-border);
	background: #fff;
}

.traexpo-dash-finance-icon {
	width: 36px;
	height: 36px;
	min-width: 36px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
}

.traexpo-dash-finance-icon--green { background: #e6f4ea; }
.traexpo-dash-finance-icon--blue { background: #e6f0fb; }
.traexpo-dash-finance-icon--red { background: #fbe9e7; }
.traexpo-dash-finance-icon--purple { background: #f1e9fb; }
.traexpo-dash-finance-icon--amber { background: #fff4e5; }

.traexpo-dash-two-col {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

.traexpo-dash-two-col--bottom {
	grid-template-columns: 1.6fr 1fr;
}

@media (max-width: 900px) {
	.traexpo-dash-two-col,
	.traexpo-dash-two-col--bottom {
		grid-template-columns: 1fr;
	}
}

.traexpo-dash-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}

.traexpo-dash-panel-header h2 {
	margin: 0;
	font-size: 16px;
	color: var(--portal-navy);
}

.traexpo-dash-panel-header a {
	font-size: 13px;
	text-decoration: none;
	color: var(--portal-primary);
}

.traexpo-dash-activity-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.traexpo-dash-activity-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 9px 0;
	border-bottom: 1px solid var(--portal-border);
}

.traexpo-dash-activity-list li:last-child {
	border-bottom: none;
}

.traexpo-dash-activity-dot {
	width: 8px;
	height: 8px;
	min-width: 8px;
	border-radius: 50%;
	background: var(--portal-primary);
	margin-top: 6px;
}

.traexpo-dash-activity-text {
	display: block;
	font-size: 13.5px;
	color: var(--portal-text);
}

.traexpo-dash-activity-meta {
	display: block;
	font-size: 12px;
	color: var(--portal-text-muted);
	margin-top: 2px;
}

.traexpo-dash-attention-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.traexpo-dash-attention-list li {
	border-bottom: 1px solid var(--portal-border);
}

.traexpo-dash-attention-list li:last-child {
	border-bottom: none;
}

.traexpo-dash-attention-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 9px 0;
	text-decoration: none;
	color: var(--portal-text);
	font-size: 13.5px;
}

.traexpo-dash-attention-list a:hover {
	color: var(--portal-primary);
}

.traexpo-dash-attention-badge {
	background: #fff4e5;
	color: #a35a00;
	font-weight: 700;
	font-size: 12px;
	padding: 2px 9px;
	border-radius: 999px;
}

.traexpo-dash-quick-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.traexpo-dash-quick-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px 8px;
	border-radius: var(--portal-radius);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

.traexpo-dash-quick-action span {
	font-size: 20px;
}

.traexpo-dash-quick-action--green { background: #e6f4ea; color: #1e7e34; }
.traexpo-dash-quick-action--blue { background: #e6f0fb; color: #0b5fb3; }
.traexpo-dash-quick-action--teal { background: #e1f5f3; color: #0f7a70; }
.traexpo-dash-quick-action--red { background: #fbe9e7; color: #c0392b; }
.traexpo-dash-quick-action--amber { background: #fff4e5; color: #a35a00; }
.traexpo-dash-quick-action--purple { background: #f1e9fb; color: #6b3fa0; }

.traexpo-needs-attention h2 {
	margin: 0 0 10px;
	font-size: 16px;
	color: var(--portal-navy);
}

.traexpo-needs-attention.has-items {
	border-left: 4px solid #d97706;
}

.traexpo-needs-attention.is-clear {
	border-left: 4px solid var(--portal-success);
}

.traexpo-attention-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.traexpo-attention-list li {
	padding: 8px 0;
	border-bottom: 1px solid var(--portal-border);
}

.traexpo-attention-list li:last-child {
	border-bottom: none;
}

.traexpo-attention-list a {
	color: var(--portal-text);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 8px;
}

.traexpo-attention-list a::before {
	content: "→";
	color: #d97706;
	font-weight: 700;
}

.traexpo-attention-list a:hover {
	color: var(--portal-primary);
}

.traexpo-balance-receivable {
	color: var(--portal-success);
	font-weight: 700;
}

.traexpo-balance-payable {
	color: var(--portal-danger);
	font-weight: 700;
}

.traexpo-balance-neutral {
	color: var(--portal-text-muted);
}

.traexpo-status-medical-fit {
	background: #e6f4ea;
	color: var(--portal-success);
}

.traexpo-status-medical-unfit {
	background: #fbe9e7;
	color: var(--portal-danger);
}

.traexpo-status-medical-pending {
	background: #fff4e5;
	color: #a35a00;
}

.traexpo-status-manpower {
	background: #fff4e5;
	color: #a35a00;
}

.traexpo-status-dispatched {
	background: #e6f0fb;
	color: var(--portal-primary);
}

.traexpo-status-rejected,
.traexpo-status-cancelled,
.traexpo-status-expired {
	background: #fbe9e7;
	color: var(--portal-danger);
}

.traexpo-passenger-context {
	margin-bottom: 16px;
	background: var(--portal-bg);
	padding: 10px 14px;
	border-radius: var(--portal-radius);
}

.traexpo-code-badge {
	font-family: monospace;
	background: var(--portal-bg);
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 13px;
	margin-right: 8px;
}

.traexpo-checkbox-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	font-weight: 400;
}

.traexpo-checkbox-row input[type="checkbox"],
.traexpo-checkbox-row input[type="radio"] {
	width: auto;
}

.traexpo-report-link {
	display: block;
	text-decoration: none;
	color: var(--portal-navy);
	font-weight: 600;
	text-align: center;
	padding: 20px 12px;
}

.traexpo-report-link:hover {
	color: var(--portal-primary);
}

.traexpo-report-export-links {
	margin-left: auto;
}

.traexpo-settings-link {
	display: flex;
	flex-direction: column;
	gap: 4px;
	text-decoration: none;
	color: var(--portal-navy);
}

.traexpo-settings-link span {
	font-weight: 400;
	font-size: 13px;
	color: var(--portal-text-muted);
}

.traexpo-settings-link:hover strong {
	color: var(--portal-primary);
}

.traexpo-accounting-branch-switcher {
	margin-bottom: 16px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.traexpo-accounting-tabs {
	display: flex;
	gap: 4px;
	border-bottom: 1px solid var(--portal-border);
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.traexpo-accounting-tab {
	display: inline-block;
	padding: 8px 14px;
	text-decoration: none;
	color: var(--portal-text-muted);
	border-bottom: 2px solid transparent;
	font-weight: 600;
	font-size: 13px;
}

.traexpo-accounting-tab.is-active {
	color: var(--portal-primary);
	border-bottom-color: var(--portal-primary);
}

.traexpo-date-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
@media (max-width: 782px) {
	.traexpo-portal-nav-toggle {
		display: block;
	}

	.traexpo-portal-sidebar {
		position: fixed;
		left: -100%;
		top: 0;
		bottom: 0;
		z-index: 100;
		transition: left 0.2s ease;
	}

	.traexpo-portal-sidebar.is-open {
		left: 0;
	}
}
