.travexa {
	--tx-bg: #f2f5f5;
	--tx-surface: #ffffff;
	--tx-surface-inset: #eef2f2;
	--tx-accent: #1c8a86;
	--tx-accent-strong: #106460;
	--tx-accent-soft: #e2f2f0;
	--tx-text: #142524;
	--tx-text-muted: #5c706e;
	--tx-text-faint: #93a5a3;
	--tx-border: #dbe4e3;
	--tx-border-strong: #c3d1d0;
	--tx-success: #2f8f5b;
	--tx-success-soft: #e6f4ec;
	--tx-warning: #b9791c;
	--tx-warning-soft: #faf1e2;
	--tx-critical: #bf4a3f;
	--tx-critical-soft: #f9e9e7;

	--tx-radius: 11px;
	--tx-shadow-sm: 0 1px 2px rgba(20,37,36,.06);
	--tx-shadow-md: 0 6px 20px rgba(16,100,96,.10);

	max-width: 1080px;
	margin: 0 auto;
	font-family: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
	color: var(--tx-text);
	font-size: 14px;
	line-height: 1.55;
	direction: ltr;
	text-align: left;
}

/* Force left-to-right everywhere, even when the surrounding WordPress
   site (theme, admin locale, or an RTL language) sets dir="rtl". */
.travexa, .travexa * { direction: ltr; }
.travexa h1, .travexa h2, .travexa h3, .travexa p, .travexa label,
.travexa th, .travexa td, .travexa button, .travexa input, .travexa select, .travexa textarea {
	text-align: left;
}

.travexa * { box-sizing: border-box; }
.travexa .mono { font-family: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
	.travexa *, .travexa-toast, .travexa-modal-overlay, .travexa-modal { transition: none !important; animation: none !important; }
}

.travexa-topline { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.travexa-role-badge {
	font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: var(--tx-accent-strong); background: var(--tx-accent-soft);
	padding: 4px 10px; border-radius: 999px;
}

.travexa-head { margin-bottom: 22px; }
.travexa-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tx-accent-strong); margin-bottom: 4px; }
.travexa-head h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.travexa-desc { color: var(--tx-text-muted); margin: 0; max-width: 68ch; }
.travexa-subhead { font-size: 15px; font-weight: 700; margin: 28px 0 12px; }

.travexa-card {
	background: var(--tx-surface); border: 1px solid var(--tx-border); border-radius: var(--tx-radius);
	margin-bottom: 16px; box-shadow: var(--tx-shadow-sm);
	transition: box-shadow .18s ease, border-color .18s ease;
}
.travexa-card-body { padding: 18px 20px; }

.travexa-section-title { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--tx-text-faint); margin-bottom: 12px; }

.travexa-grid { display: grid; gap: 14px; }
.travexa-grid-3 { grid-template-columns: repeat(3, 1fr); }
.travexa-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 720px) { .travexa-grid-3, .travexa-grid-2 { grid-template-columns: 1fr; } }

.travexa-field, .travexa-select { display: flex; flex-direction: column; gap: 6px; position: relative; }
.travexa label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tx-text-faint); }
.travexa label .req { color: var(--tx-critical); }

.travexa input[type=text], .travexa input[type=email], .travexa input[type=number],
.travexa input[type=date], .travexa select, .travexa textarea {
	font: inherit; font-size: 13px; padding: 9px 11px; border-radius: 7px;
	border: 1px solid var(--tx-border-strong); background: var(--tx-surface); color: var(--tx-text); width: 100%;
}
.travexa textarea { min-height: 70px; resize: vertical; }
.travexa input:focus, .travexa select:focus, .travexa textarea:focus { outline: none; border-color: var(--tx-accent); box-shadow: 0 0 0 3px var(--tx-accent-soft); }

.tx-combo { position: relative; }
.tx-combo-input { padding-right: 30px !important; cursor: pointer; }
.tx-combo::after {
	content: ""; position: absolute; right: 11px; top: 50%; width: 8px; height: 8px;
	border-right: 1.6px solid var(--tx-text-faint); border-bottom: 1.6px solid var(--tx-text-faint);
	transform: translateY(-70%) rotate(45deg); pointer-events: none; transition: transform .15s ease;
}
.travexa-select.is-searching .tx-combo::after {
	width: 12px; height: 12px; border: 1.6px solid var(--tx-border-strong); border-top-color: var(--tx-accent);
	border-radius: 50%; transform: translateY(-50%); animation: travexa-combo-spin .6s linear infinite;
}
@keyframes travexa-combo-spin { to { transform: translateY(-50%) rotate(360deg); } }
.tx-combo-results {
	position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
	background: var(--tx-surface); border: 1px solid var(--tx-border-strong); border-radius: 9px;
	box-shadow: var(--tx-shadow-md); max-height: 240px; overflow-y: auto;
	opacity: 0; transform: translateY(-4px); transition: opacity .14s ease, transform .14s ease;
}
.tx-combo-results.is-open { opacity: 1; transform: translateY(0); }
.tx-combo-result { padding: 9px 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid var(--tx-border); }
.tx-combo-result:last-child { border-bottom: none; }
.tx-combo-result:hover, .tx-combo-result.active { background: var(--tx-accent-soft); }
.tx-combo-result .tx-result-sub { color: var(--tx-text-faint); font-size: 11.5px; margin-top: 1px; }
.tx-combo-empty { padding: 10px 12px; color: var(--tx-text-faint); font-size: 12.5px; }

.tx-link-btn {
	align-self: flex-start; background: none; border: none; padding: 0; margin-top: 2px;
	font-size: 12px; font-weight: 700; color: var(--tx-accent-strong); cursor: pointer;
}
.tx-link-btn:hover { color: var(--tx-accent); }

.tx-new-client-form {
	display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 12px;
	background: var(--tx-surface-inset); border: 1px solid var(--tx-border); border-radius: 9px;
	opacity: 0; max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; margin-top: 0;
	transition: opacity .18s ease, max-height .18s ease, padding .18s ease, margin .18s ease;
}
.tx-new-client-form.is-open { opacity: 1; max-height: 260px; padding: 12px; margin-top: 8px; }
.tx-nc-actions { display: flex; gap: 8px; }

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

.travexa-pricing { border-top: 1px solid var(--tx-border); border-bottom: 1px solid var(--tx-border); padding: 18px 20px; }
.travexa-pricing-head, .travexa-pricing-row {
	display: grid; grid-template-columns: 110px 90px 1fr 90px 1fr 90px; gap: 10px; align-items: center;
}
.travexa-pricing-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-text-faint); margin-bottom: 8px; }
.travexa-pricing-row { padding: 6px 0; }
.travexa-pax-label { font-size: 12.5px; font-weight: 700; color: var(--tx-text); }
@media (max-width: 720px) {
	.travexa-pricing-head { display: none; }
	.travexa-pricing-row { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
}

.travexa-form-msg { margin: 0 20px; padding: 10px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.travexa-form-msg.tx-msg-error { background: var(--tx-critical-soft); color: var(--tx-critical); }
.travexa-form-msg.tx-msg-success { background: var(--tx-success-soft); color: var(--tx-success); }

.travexa-form-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 20px; }

.travexa-btn {
	font: inherit; font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 8px; cursor: pointer;
	border: 1px solid transparent; transition: background .13s ease, border-color .13s ease, transform .08s ease;
	position: relative;
}
.travexa-btn:active { transform: translateY(1px); }
.travexa-btn-sm { padding: 6px 11px; font-size: 12px; }
.travexa-btn-ghost { background: var(--tx-surface); border-color: var(--tx-border-strong); color: var(--tx-text-muted); }
.travexa-btn-ghost:hover { background: var(--tx-surface-inset); }
.travexa-btn-primary { background: var(--tx-accent); color: #eafbf9; box-shadow: 0 1px 2px rgba(16,100,96,.18); }
.travexa-btn-primary:hover { background: var(--tx-accent-strong); }
.travexa-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.travexa-btn.is-loading { color: transparent !important; pointer-events: none; }
.travexa-btn.is-loading::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
	border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: travexa-spin .6s linear infinite;
}
.travexa-btn-ghost.is-loading::after { border-color: var(--tx-border-strong); border-top-color: var(--tx-text-muted); }

.travexa-table-wrap { overflow-x: auto; border: 1px solid var(--tx-border); border-radius: 10px; background: var(--tx-surface); }
.travexa-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.travexa-table th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tx-text-faint); padding: 10px 14px; border-bottom: 1px solid var(--tx-border); white-space: nowrap; }
.travexa-table td { padding: 11px 14px; border-bottom: 1px solid var(--tx-border); vertical-align: top; }
.travexa-table tbody tr:hover td { background: var(--tx-surface-inset); }
.travexa-table tr:last-child td { border-bottom: none; }
.travexa-subtext { color: var(--tx-text-faint); font-size: 11.5px; margin-top: 2px; }
.travexa-empty { padding: 20px; text-align: center; color: var(--tx-text-faint); }

.tx-row-new td { animation: travexa-row-flash 1.4s ease; }
@keyframes travexa-row-flash {
	0% { background: var(--tx-accent-soft); }
	100% { background: transparent; }
}

.tx-row-toggle {
	font: inherit; background: none; border: none; padding: 0; margin: 0; cursor: pointer;
	color: var(--tx-accent-strong); font-weight: 700; text-decoration: underline dotted;
}
.tx-detail-row td { background: var(--tx-surface-inset); padding: 16px 18px; }
.travexa-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 720px) { .travexa-detail-grid { grid-template-columns: 1fr; } }
.travexa-detail-text { font-size: 13px; white-space: pre-wrap; }
.travexa-detail-pricing { border-collapse: collapse; font-size: 12.5px; }
.travexa-detail-pricing th, .travexa-detail-pricing td { text-align: left; padding: 5px 14px 5px 0; }
.travexa-detail-pricing th { color: var(--tx-text-faint); font-weight: 700; text-transform: uppercase; font-size: 10.5px; letter-spacing: .04em; }

.travexa-badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.travexa-status-pending { background: var(--tx-warning-soft); color: var(--tx-warning); }
.travexa-status-acc_registered { background: var(--tx-success-soft); color: var(--tx-success); }

.travexa-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.travexa-inline-form input { width: auto; flex: 1 1 180px; }

.travexa-switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.travexa-switch input { opacity: 0; width: 0; height: 0; }
.travexa-switch span { position: absolute; inset: 0; background: var(--tx-border-strong); border-radius: 999px; transition: background .15s ease; cursor: pointer; }
.travexa-switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s ease; }
.travexa-switch input:checked + span { background: var(--tx-accent); }
.travexa-switch input:checked + span::before { transform: translateX(16px); }

.travexa-tab-nav { display: flex; gap: 2px; background: var(--tx-surface-inset); border: 1px solid var(--tx-border); border-radius: 9px; padding: 3px; margin-bottom: 16px; flex-wrap: wrap; }
.travexa-tab-btn { font: inherit; font-size: 12.5px; font-weight: 700; background: transparent; border: none; padding: 8px 14px; border-radius: 7px; cursor: pointer; color: var(--tx-text-muted); transition: background .13s ease, color .13s ease; }
.travexa-tab-btn:hover { color: var(--tx-text); }
.travexa-tab-btn.active { background: var(--tx-surface); color: var(--tx-text); box-shadow: 0 1px 2px rgba(20,37,36,.08); }
.tx-tab-enter { animation: travexa-tab-fade .18s ease; }
@keyframes travexa-tab-fade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.travexa-gate { padding: 24px; border: 1px solid var(--tx-border); border-radius: var(--tx-radius); background: var(--tx-surface-inset); }

/* ---------------------------------------------------------------
 * Toasts + confirm modal (replace native alert()/confirm())
 * ------------------------------------------------------------- */

.travexa-toast-host {
	position: fixed; right: 20px; bottom: 20px; z-index: 9999;
	display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
	font-family: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
	direction: ltr; text-align: left;
}
.travexa-toast {
	background: #142524; color: #eafbf9; font-size: 13px; font-weight: 600;
	padding: 11px 16px; border-radius: 9px; box-shadow: 0 8px 24px rgba(0,0,0,.22);
	opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease;
	max-width: 320px;
}
.travexa-toast.is-visible { opacity: 1; transform: translateY(0); }
.travexa-toast-success { background: #16543a; }
.travexa-toast-error { background: #5a2420; }

.travexa-modal-overlay {
	position: fixed; inset: 0; background: rgba(10,20,20,.42); z-index: 9998;
	display: flex; align-items: center; justify-content: center; padding: 20px;
	opacity: 0; transition: opacity .16s ease;
	font-family: "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
}
.travexa-modal-overlay.is-visible { opacity: 1; }
.travexa-modal {
	background: #fff; border-radius: 12px; padding: 20px 22px; max-width: 360px; width: 100%;
	box-shadow: 0 20px 48px rgba(0,0,0,.28); transform: scale(.96); transition: transform .16s ease;
	direction: ltr; text-align: left; color: #142524;
}
.travexa-modal-overlay.is-visible .travexa-modal { transform: scale(1); }
.travexa-modal p { margin: 0 0 16px; font-size: 14px; line-height: 1.5; }
.travexa-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------------------------------------------------------------
 * wp-admin integration wrapper
 * ------------------------------------------------------------- */

.travexa-wp-wrap .travexa-wp-title { margin-bottom: 18px; }
.travexa-wp-wrap .travexa { max-width: none; margin: 0; }

.travexa-stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .travexa-stat-grid { grid-template-columns: repeat(2, 1fr); } }
.travexa-stat-tile {
	background: var(--tx-surface); border: 1px solid var(--tx-border); border-radius: var(--tx-radius);
	padding: 16px 18px; box-shadow: var(--tx-shadow-sm);
}
.travexa-stat-num { font-size: 26px; font-weight: 700; color: var(--tx-accent-strong); line-height: 1.1; }
.travexa-stat-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--tx-text-faint); margin-top: 4px; }

.travexa-quicklinks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.travexa-quicklinks li { font-size: 13px; color: var(--tx-text-muted); }
.travexa-quicklinks a { color: var(--tx-accent-strong); font-weight: 700; text-decoration: none; }
.travexa-quicklinks a:hover { text-decoration: underline; }
