﻿:root {
    --tp-bg: #081017;
    --tp-bg-soft: #0f1821;
    --tp-surface: rgba(11, 19, 28, 0.88);
    --tp-surface-strong: rgba(14, 23, 34, 0.96);
    --tp-border: rgba(255, 255, 255, 0.09);
    --tp-border-strong: rgba(255, 255, 255, 0.16);
    --tp-text: #eef4f8;
    --tp-text-soft: rgba(238, 244, 248, 0.72);
    --tp-text-muted: rgba(238, 244, 248, 0.48);
    --tp-accent: #b3ff30;
    --tp-accent-2: #2ce4c5;
    --tp-accent-3: #4aa7ff;
    --tp-warning: #ffc857;
    --tp-danger: #ff7878;
    --tp-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
    --tp-radius-xl: 28px;
    --tp-radius-lg: 22px;
    --tp-radius-md: 16px;
    --tp-radius-sm: 12px;
}

*,:before,:after { box-sizing: border-box; }
html,body { margin: 0; min-height: 100%; }
body {
    font-family: "Manrope", sans-serif;
    color: var(--tp-text);
    background:
        radial-gradient(1000px 500px at 0% 0%, rgba(44, 228, 197, 0.11), transparent 50%),
        radial-gradient(800px 420px at 100% 0%, rgba(179, 255, 48, 0.12), transparent 52%),
        linear-gradient(180deg, #050a0f 0%, #091019 50%, #060b11 100%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { border: 0; }

.tp-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    backdrop-filter: blur(18px);
    background: rgba(5, 10, 16, 0.72);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tp-brand { display: inline-flex; align-items: center; gap: 14px; }
.tp-brand-mark {
    width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 16px; color: #091117; background: linear-gradient(135deg, var(--tp-accent), #efff81);
    box-shadow: 0 12px 24px rgba(179,255,48,0.2);
}
.tp-brand-copy { display: flex; flex-direction: column; gap: 3px; }
.tp-brand-copy strong { font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; }
.tp-brand-copy small { color: var(--tp-text-muted); }
.tp-topbar-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.tp-topbar-link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px;
    border-radius: 999px; border: 1px solid var(--tp-border); background: rgba(255,255,255,0.03); color: var(--tp-text-soft);
}
.tp-topbar-button { cursor: pointer; }

.tp-page { width: min(1480px, calc(100vw - 40px)); margin: 0 auto; padding: 28px 0 40px; }
.tp-hero {
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, 460px); gap: 22px; margin-bottom: 22px;
}
.tp-hero-copy, .tp-planner-card, .tp-panel {
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-xl);
    background:
        radial-gradient(120% 120% at 0% 0%, rgba(44,228,197,0.07), transparent 46%),
        linear-gradient(180deg, rgba(11,19,28,0.92), rgba(8,14,22,0.96));
    box-shadow: var(--tp-shadow);
}
.tp-hero-copy { padding: 34px; }
.tp-eyebrow { margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem; color: var(--tp-accent); font-weight: 800; }
.tp-hero-copy h1 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.02; letter-spacing: -0.04em; }
.tp-hero-text { margin: 18px 0 0; max-width: 62ch; color: var(--tp-text-soft); font-size: 1.02rem; line-height: 1.7; }
.tp-hero-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.tp-hero-meta span {
    display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--tp-border);
}
.tp-hero-meta i { color: var(--tp-accent); }

.tp-planner-card { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.tp-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.tp-card-head h2, .tp-card-head h3 { margin: 0; font-size: 1.15rem; }
.tp-card-head p { margin: 8px 0 0; color: var(--tp-text-soft); line-height: 1.55; }
.tp-form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.tp-field-group { position: relative; }
.tp-field-group label { display: inline-block; margin-bottom: 8px; color: var(--tp-text-muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
.tp-search-wrap, .tp-time-field input {
    display: flex; align-items: center; gap: 12px; min-height: 56px; width: 100%;
    border-radius: 18px; padding: 0 16px; border: 1px solid var(--tp-border); background: rgba(255,255,255,0.04); color: var(--tp-text);
}
.tp-search-wrap i { color: var(--tp-accent); }
.tp-search-wrap input, .tp-time-field input {
    width: 100%; border: 0; outline: 0; background: transparent; color: var(--tp-text);
}
.tp-suggestions {
    position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 20; display: none;
    background: rgba(7,12,18,0.97); border: 1px solid var(--tp-border-strong); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}
.tp-suggestions.is-open { display: block; }
.tp-suggestion-item {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px;
    background: transparent; color: var(--tp-text); cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05);
}
.tp-suggestion-item:last-child { border-bottom: 0; }
.tp-suggestion-item:hover { background: rgba(255,255,255,0.05); }
.tp-suggestion-copy { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.tp-suggestion-copy small { color: var(--tp-text-muted); }
.tp-selection-meta { margin-top: 8px; color: var(--tp-text-soft); font-size: 0.94rem; line-height: 1.5; min-height: 22px; }

.tp-inline-tools { display: flex; gap: 14px; align-items: end; justify-content: space-between; flex-wrap: wrap; }
.tp-time-field { min-width: 180px; flex: 1 1 180px; }
.tp-time-field label { display: inline-block; margin-bottom: 8px; color: var(--tp-text-muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
.tp-inline-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tp-primary-btn, .tp-secondary-btn, .tp-link-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px;
    border-radius: 16px; cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.tp-primary-btn {
    background: linear-gradient(135deg, var(--tp-accent), #efff81); color: #091117; font-weight: 800;
}
.tp-secondary-btn, .tp-link-btn {
    background: rgba(255,255,255,0.04); color: var(--tp-text); border: 1px solid var(--tp-border);
}
.tp-primary-btn:hover, .tp-secondary-btn:hover, .tp-link-btn:hover { transform: translateY(-1px); }
.tp-helper-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.tp-helper-link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 999px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--tp-border); color: var(--tp-text-soft);
}
.tp-helper-link.is-disabled { opacity: 0.45; pointer-events: none; }

.tp-grid { display: grid; grid-template-columns: minmax(320px, 430px) minmax(0, 1fr); gap: 22px; }
.tp-column { display: grid; gap: 22px; align-self: start; }
.tp-panel { padding: 24px; }
.tp-stop-board, .tp-results-list { display: grid; gap: 12px; }
.tp-stop-summary {
    padding: 16px 18px; border-radius: 18px; border: 1px solid var(--tp-border); background: rgba(255,255,255,0.03);
}
.tp-stop-summary strong { display: block; font-size: 1.08rem; }
.tp-stop-summary small { display: inline-block; margin-top: 4px; color: var(--tp-text-muted); }
.tp-line-card, .tp-connection-card {
    border-radius: 20px; border: 1px solid var(--tp-border); background: rgba(255,255,255,0.04); overflow: hidden;
}
.tp-line-card-head, .tp-connection-head {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tp-line-badge {
    display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 38px; padding: 0 12px;
    border-radius: 14px; font-weight: 800; font-family: "Space Grotesk", sans-serif;
}
.tp-line-copy { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; }
.tp-line-copy strong { font-size: 1rem; }
.tp-line-copy small { color: var(--tp-text-muted); }
.tp-line-departures { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.tp-pill {
    display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.07); color: var(--tp-text-soft); font-size: 0.92rem;
}
.tp-line-actions, .tp-connection-actions {
    display: flex; flex-wrap: wrap; gap: 10px; padding: 0 18px 18px;
}
.tp-summary-panel.is-empty { min-height: 220px; display: flex; align-items: center; }
.tp-summary-panel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tp-stat {
    padding: 16px 18px; border-radius: 18px; border: 1px solid var(--tp-border); background: rgba(255,255,255,0.04);
}
.tp-stat span { display: block; color: var(--tp-text-muted); font-size: 0.84rem; text-transform: uppercase; letter-spacing: 0.08em; }
.tp-stat strong { display: block; margin-top: 8px; font-size: 1.4rem; font-family: "Space Grotesk", sans-serif; }
.tp-connection-card { display: grid; gap: 16px; }
.tp-connection-route { padding: 0 18px; display: grid; gap: 12px; }
.tp-leg {
    display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 0;
    border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.tp-leg:last-child { border-bottom: 0; }
.tp-leg-times { display: flex; flex-direction: column; gap: 6px; text-align: right; }
.tp-leg-times strong { font-size: 1rem; }
.tp-leg-times small, .tp-leg-copy small { color: var(--tp-text-muted); }
.tp-leg-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tp-leg-copy strong { font-size: 1rem; }
.tp-leg-copy span { color: var(--tp-text-soft); line-height: 1.5; }
.tp-transfer-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 34px; border-radius: 999px;
    background: rgba(255, 200, 87, 0.12); border: 1px solid rgba(255, 200, 87, 0.24); color: #ffd27b; width: fit-content;
}
.tp-empty-state {
    display: grid; place-items: center; gap: 10px; min-height: 220px; text-align: center; color: var(--tp-text-soft);
}
.tp-empty-state-small { min-height: 140px; }
.tp-empty-state i { font-size: 1.6rem; color: var(--tp-accent); }
.tp-notice {
    padding: 16px 18px; border-radius: 18px; border: 1px solid var(--tp-border); background: rgba(255,255,255,0.04); color: var(--tp-text-soft);
}
.tp-notice.is-error { border-color: rgba(255, 120, 120, 0.4); color: #ffb0b0; }
.tp-notice.is-loading { color: var(--tp-text-muted); }
.tp-hidden { display: none !important; }

@media (max-width: 1120px) {
    .tp-hero, .tp-grid { grid-template-columns: 1fr; }
    .tp-summary-panel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .tp-topbar { padding: 14px 16px; }
    .tp-page { width: min(100vw - 20px, 100%); padding: 20px 0 28px; }
    .tp-hero-copy, .tp-planner-card, .tp-panel { padding: 18px; }
    .tp-topbar-actions { width: 100%; }
    .tp-topbar-link { flex: 1 1 auto; justify-content: center; }
    .tp-inline-tools { flex-direction: column; align-items: stretch; }
    .tp-inline-actions { width: 100%; }
    .tp-inline-actions > * { flex: 1 1 0; }
    .tp-summary-panel-grid { grid-template-columns: 1fr; }
    .tp-leg { grid-template-columns: 1fr; }
    .tp-leg-times { text-align: left; }
}
