:root {
    color-scheme: light;
    --bg: #f2f3f5;
    --surface: #ffffff;
    --ink: #111827;
    --muted: #7b8190;
    --line: #e3e6ed;
    --field: #f9fafc;
    --primary: #5b4fd7;
    --primary-dark: #4638bc;
    --accent: #f04438;
    --teal: #20b7bd;
    --danger-bg: #fff1f0;
    --danger: #b42318;
    --success-bg: #ecfdf3;
    --success: #027a48;
    --shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
}

a {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 34px 18px;
    position: relative;
    overflow: hidden;
}

.page-shell::before {
    content: "";
    position: fixed;
    inset: 0 48% 0 0;
    background: #0c111c url("/img/bg.jpg") center bottom / cover no-repeat;
    opacity: 0.96;
    pointer-events: none;
}

.page-shell::after {
    content: "";
    position: fixed;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 18vw;
    min-width: 160px;
    background: var(--bg);
    transform: skewX(-5deg);
    transform-origin: top;
    pointer-events: none;
}

.auth-layout {
    position: relative;
    z-index: 1;
    width: min(100%, 1100px);
    min-height: 650px;
    display: grid;
    grid-template-columns: minmax(340px, 1.04fr) minmax(360px, 0.96fr);
    align-items: stretch;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-layout-signup {
    min-height: 720px;
}

.auth-visual {
    position: relative;
    min-height: 650px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 38px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(8, 13, 24, 0.08), rgba(8, 13, 24, 0.58)),
        url("/img/bg.jpg") center bottom / cover no-repeat;
    isolation: isolate;
}

.auth-visual::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    pointer-events: none;
    z-index: -1;
}

.visual-topbar,
.visual-copy {
    position: relative;
    z-index: 1;
}

.visual-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.visual-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.18));
}

.visual-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.visual-pill:hover {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.visual-copy {
    max-width: 390px;
}

.visual-kicker,
.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.visual-kicker {
    color: rgba(255, 255, 255, 0.82);
}

.visual-copy h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 0.98;
}

.visual-copy p:last-child {
    margin: 18px 0 0;
    max-width: 310px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 650px;
    padding: 52px 70px;
    background: #fff;
}

.auth-layout-signup .auth-panel {
    padding-block: 42px;
}

.brand-mark {
    display: flex;
    justify-content: center;
    margin-bottom: 34px;
}

.brand-mark img {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.auth-heading {
    margin-bottom: 28px;
    text-align: center;
}

h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.02;
    font-weight: 950;
}

.lead,
.muted {
    color: var(--muted);
    line-height: 1.65;
}

.lead {
    margin: 12px 0 0;
    font-size: 15px;
}

.auth-form {
    display: grid;
    gap: 15px;
}

.auth-form.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    color: #4a5160;
    font-size: 13px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 15px;
    color: var(--ink);
    font-size: 15px;
    outline: none;
    background: var(--field);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #687083 50%), linear-gradient(135deg, #687083 50%, transparent 50%);
    background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(240, 68, 56, 0.62);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(240, 68, 56, 0.12);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    padding: 0 22px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(240, 68, 56, 0.22);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(217, 45, 32, 0.26);
}

.button:disabled,
.mini-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.button-secondary {
    background: #f4f6fa;
    color: var(--ink);
    box-shadow: none;
}

.button-secondary:hover {
    background: #e9edf4;
    color: var(--ink);
}

.alert {
    margin: 0 0 20px;
    border-radius: 8px;
    padding: 13px 15px;
    line-height: 1.5;
    font-size: 14px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
}

.switch-link {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.app-shell {
    min-height: 100vh;
    padding: 28px 18px 42px;
    background:
        radial-gradient(circle at 16% 0%, rgba(91, 79, 215, 0.18), transparent 34%),
        radial-gradient(circle at 90% 10%, rgba(32, 183, 189, 0.12), transparent 28%),
        linear-gradient(180deg, #f3f0ff 0%, #edf2f7 100%);
}

.journal {
    width: min(100%, 1180px);
    margin: 0 auto;
}

.travel-home {
    width: min(100%, 1160px);
    margin: 0 auto;
}

.travel-dashboard {
    width: min(100%, 1280px);
    min-height: calc(100vh - 70px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) 260px;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 88px rgba(46, 36, 94, 0.18);
}

.dashboard-sidebar,
.dashboard-rail {
    background: #fbfbff;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 28px 18px;
    border-right: 1px solid #edf0f7;
}

.sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 950;
}

.sidebar-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.sidebar-nav {
    display: grid;
    gap: 8px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    border-radius: 8px;
    padding: 0 12px;
    color: #697084;
    font-size: 14px;
    font-weight: 900;
}

.sidebar-nav a span {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: #eff1fb;
    color: var(--primary);
    font-size: 12px;
    font-weight: 950;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: var(--primary);
    color: #fff;
}

.sidebar-nav a.active span,
.sidebar-nav a:hover span {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.sidebar-note {
    margin-top: auto;
    display: grid;
    gap: 8px;
    border-radius: 8px;
    padding: 16px;
    background: #f0f7ff;
    color: #697084;
    font-size: 13px;
    line-height: 1.55;
}

.sidebar-note strong {
    color: var(--ink);
}

.dashboard-content {
    min-width: 0;
    padding: 28px;
    background: #fff;
}

.dashboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-top h1 {
    font-size: clamp(34px, 4vw, 48px);
}

.dashboard-search-link {
    width: min(100%, 245px);
    min-height: 48px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    border: 1px solid #edf0f7;
    border-radius: 8px;
    padding: 7px 7px 7px 16px;
    background: #fafbff;
    color: #697084;
    font-size: 13px;
    font-weight: 900;
}

.dashboard-search-link strong {
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    line-height: 1;
}

.dashboard-section {
    margin-bottom: 26px;
}

.section-heading,
.rail-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-heading h2,
.panel-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.12;
}

.ghost-link {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0 14px;
    background: #f3f4fb;
    color: var(--primary);
    font-size: 13px;
    font-weight: 950;
}

.dashboard-panel,
.planner-card,
.planner-empty {
    border: 1px solid #edf0f7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
}

.planner-card {
    display: grid;
    grid-template-columns: minmax(250px, 0.88fr) minmax(0, 1.12fr);
    overflow: hidden;
}

.planner-visual {
    min-height: 420px;
    display: grid;
    place-items: end start;
    overflow: hidden;
    padding: 24px;
    background:
        linear-gradient(180deg, rgba(16, 24, 40, 0.08), rgba(16, 24, 40, 0.78)),
        url("/img/bg.jpg") center / cover no-repeat;
    color: #fff;
    font-size: 54px;
    font-weight: 950;
}

.planner-visual img {
    width: calc(100% + 48px);
    height: calc(100% + 48px);
    margin: -24px;
    object-fit: cover;
}

.planner-body {
    min-width: 0;
    padding: 24px;
}

.planner-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.planner-title-row h3,
.planner-empty h3 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1;
}

.planner-title-row span {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-weight: 800;
}

.round-icon-link {
    width: 42px;
    height: 42px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 30px;
    font-weight: 400;
    line-height: 1;
}

.round-icon-link:hover {
    background: var(--primary-dark);
    color: #fff;
}

.planner-form {
    display: grid;
    grid-template-columns: minmax(160px, 0.55fr) minmax(0, 1fr);
    gap: 13px;
}

.planner-form textarea {
    min-height: 86px;
}

.city-planner-slot {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(180px, 1fr);
    align-items: center;
    gap: 12px;
    border: 1px dashed #d6dbee;
    border-radius: 8px;
    padding: 14px;
    background: #fafbff;
}

.city-planner-slot strong,
.city-planner-slot span {
    display: block;
}

.city-planner-slot span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.city-planner-slot input:disabled {
    color: #9aa2b6;
    background: #eef1f8;
}

.planner-empty {
    min-height: 280px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: clamp(24px, 4vw, 44px);
    background:
        linear-gradient(135deg, #111827 0%, #222b46 55%, #5b4fd7 145%);
    color: #fff;
}

.planner-empty h3,
.planner-empty .eyebrow,
.planner-empty .muted {
    color: #fff;
}

.planner-empty .muted {
    max-width: 540px;
    opacity: 0.76;
}

.destination-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.destination-card {
    overflow: hidden;
    border: 1px solid #edf0f7;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.07);
}

.destination-card > div:last-child {
    padding: 13px;
}

.destination-card strong,
.destination-card span {
    display: block;
}

.destination-card span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.destination-media {
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #111827, var(--primary));
    color: #fff;
    font-size: 34px;
    font-weight: 950;
}

.destination-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dashboard-rail {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 28px 18px;
    border-left: 1px solid #edf0f7;
}

.profile-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.profile-card strong,
.profile-card span {
    display: block;
}

.profile-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd166, var(--accent));
    color: #fff;
    font-weight: 950;
}

.rail-panel {
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tool-grid span {
    min-height: 46px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #f2f0ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 950;
}

.tool-grid .disabled {
    color: #9aa2b6;
    background: #f3f5fa;
}

.rail-heading {
    align-items: center;
}

.rail-heading .eyebrow {
    margin: 0;
}

.rail-heading a {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 22px;
    font-weight: 500;
}

.rail-country-list {
    display: grid;
    gap: 10px;
}

.rail-country {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.rail-country .place-thumb {
    width: 46px;
    height: 46px;
}

.rail-country strong,
.rail-country span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rail-country span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.empty-state.compact {
    padding: 14px;
    font-size: 13px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 38px;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}

.topbar-brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: end;
    gap: 24px;
    margin-bottom: 22px;
}

.home-hero h1 {
    max-width: 760px;
    font-size: clamp(44px, 7vw, 86px);
    letter-spacing: 0;
}

.home-hero .muted {
    max-width: 650px;
    margin: 16px 0 0;
    font-size: 17px;
}

.hero-summary {
    min-height: 150px;
    display: grid;
    align-content: center;
    gap: 6px;
    border: 1px solid rgba(227, 230, 237, 0.82);
    border-radius: 8px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.hero-summary span {
    color: var(--primary);
    font-size: 56px;
    font-weight: 950;
    line-height: 1;
}

.hero-summary strong {
    color: var(--ink);
}

.next-trip-shell {
    margin: 0 0 20px;
}

.next-trip-card,
.country-search-panel {
    border: 1px solid rgba(227, 230, 237, 0.9);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

.next-trip-card {
    min-height: 260px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: clamp(26px, 5vw, 54px);
    background:
        linear-gradient(135deg, #111827 0%, #1f2937 58%, #f04438 160%);
    color: #fff;
}

.next-trip-card .eyebrow,
.next-trip-card .muted,
.next-trip-card h2 {
    color: #fff;
}

.next-trip-card .muted {
    max-width: 560px;
    opacity: 0.78;
}

.next-trip-card h2 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1;
}

.add-trip-button {
    width: clamp(96px, 14vw, 144px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: clamp(58px, 8vw, 88px);
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 22px 48px rgba(240, 68, 56, 0.36);
    transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.add-trip-button:hover {
    color: #fff;
    background: var(--primary-dark);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 28px 58px rgba(217, 45, 32, 0.42);
}

.country-search-panel {
    padding: clamp(22px, 4vw, 34px);
}

.country-live-search {
    display: grid;
    gap: 14px;
}

.country-live-input input {
    min-height: 60px;
    border-color: #d9dee8;
    background: #fff;
    font-size: 17px;
}

.country-live-list {
    display: grid;
    gap: 8px;
    max-height: 430px;
    overflow: auto;
    padding: 4px 4px 4px 0;
    scrollbar-color: #c5ccd9 transparent;
}

.country-live-empty {
    border: 1px dashed #cbd2df;
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: #f9fafc;
}

.country-live-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.country-live-row:hover {
    border-color: rgba(240, 68, 56, 0.36);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.country-live-copy {
    min-width: 0;
}

.country-live-copy strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-live-copy span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.country-close-link {
    justify-self: start;
    color: var(--muted);
    font-size: 14px;
    font-weight: 900;
}

.country-close-link:hover {
    color: var(--ink);
}

.country-search-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px;
}

.country-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.country-result,
.selected-country {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcff;
}

.selected-country {
    grid-template-columns: 54px minmax(0, 1fr);
}

.country-result strong,
.selected-country strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
}

.country-result span,
.selected-country span {
    color: var(--muted);
    font-size: 13px;
}

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 18px;
    align-items: start;
}

.selected-country-list {
    display: grid;
    gap: 10px;
}

.journal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 24px;
    padding: 8px 0 4px;
}

.journal-header h1 {
    font-size: clamp(38px, 5vw, 68px);
    max-width: 720px;
}

.journal-header .muted {
    max-width: 680px;
    margin: 14px 0 0;
}

.journal-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.86fr) minmax(420px, 1.14fr);
    gap: 18px;
    align-items: start;
}

.journal-panel {
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.panel-heading {
    margin-bottom: 18px;
}

.panel-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 25px;
    line-height: 1.1;
}

.panel-heading .muted {
    margin: 9px 0 0;
    font-size: 14px;
}

.inline-search,
.trip-search {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.trip-search {
    grid-template-columns: minmax(170px, 0.7fr) minmax(190px, 1fr) auto;
    align-items: end;
}

.result-list {
    display: grid;
    gap: 10px;
}

.place-row {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px;
    background: #fbfcff;
}

.place-row strong,
.city-content strong,
.country-card strong,
.trip-item strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
}

.place-row span,
.city-content span,
.trip-item span {
    color: var(--muted);
    font-size: 13px;
}

.place-thumb,
.city-media,
.country-visual {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #111827, #f04438);
    color: #fff;
    font-weight: 950;
}

.place-thumb {
    width: 54px;
    height: 54px;
}

.place-thumb img,
.city-media img,
.country-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-pill,
.mini-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 900;
}

.status-pill {
    background: #ecfdf3;
    color: #027a48;
}

.mini-button {
    border: 0;
    background: #111827;
    color: #fff;
    cursor: pointer;
}

.mini-button:hover {
    background: #2d3748;
}

.empty-state {
    display: grid;
    gap: 5px;
    border: 1px dashed #cbd2df;
    border-radius: 8px;
    padding: 18px;
    color: var(--muted);
    background: #f9fafc;
}

.empty-state strong {
    color: var(--ink);
}

.city-grid,
.country-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.city-card,
.country-card {
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #fbfcff;
}

.city-media {
    aspect-ratio: 16 / 8.6;
    font-size: 28px;
}

.country-visual {
    aspect-ratio: 16 / 7.4;
    font-size: 30px;
}

.compact-form {
    display: grid;
    gap: 9px;
}

.compact-form .button {
    min-height: 42px;
    font-size: 13px;
}

.image-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.image-form input {
    min-height: 38px;
    font-size: 13px;
}

.trip-list {
    display: grid;
    gap: 10px;
}

.trip-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    background: #fbfcff;
}

.trip-item time {
    color: var(--primary);
    font-size: 13px;
    font-weight: 900;
}

.dashboard,
.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 860px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 32px;
}

.auth-card {
    width: min(100%, 560px);
}

.auth-card.wide {
    width: min(100%, 680px);
}

.dashboard-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.info-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #fbfcff;
}

.label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 920px) {
    .page-shell {
        padding: 18px;
    }

    .page-shell::before,
    .page-shell::after {
        display: none;
    }

    .auth-layout,
    .auth-layout-signup {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-visual {
        min-height: 280px;
        padding: 28px;
    }

    .auth-visual::before {
        inset: 14px;
    }

    .visual-logo {
        width: 58px;
        height: 58px;
    }

    .visual-copy h2 {
        font-size: 36px;
    }

    .auth-panel,
    .auth-layout-signup .auth-panel {
        min-height: 0;
        padding: 34px 24px;
    }

    .brand-mark {
        margin-bottom: 20px;
    }

    .brand-mark img {
        width: 68px;
        height: 68px;
    }

    h1 {
        font-size: 36px;
    }

    .app-shell {
        padding: 22px 14px;
    }

    .topbar {
        margin-bottom: 26px;
    }

    .home-hero,
    .home-grid,
    .country-search-form,
    .country-results {
        grid-template-columns: 1fr;
    }

    .home-hero h1 {
        font-size: 44px;
    }

    .hero-summary {
        min-height: 116px;
    }

    .next-trip-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .journal-header,
    .journal-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .trip-search,
    .city-grid,
    .country-grid {
        grid-template-columns: 1fr;
    }

    .travel-dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        border-right: 0;
        border-bottom: 1px solid #edf0f7;
    }

    .sidebar-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sidebar-note {
        margin-top: 0;
    }

    .dashboard-rail {
        border-left: 0;
        border-top: 1px solid #edf0f7;
    }

    .planner-card,
    .destination-strip {
        grid-template-columns: 1fr;
    }

    .planner-visual {
        min-height: 260px;
    }
}

@media (max-width: 680px) {
    .auth-form.two-column,
    .info-grid {
        grid-template-columns: 1fr;
    }

    .dashboard,
    .auth-card {
        padding: 24px;
    }

    .dashboard-header {
        display: grid;
    }

    .visual-copy h2,
    h1 {
        font-size: 31px;
    }

    .journal-panel {
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar-brand span {
        display: none;
    }

    .country-search-form .button,
    .country-search-form .button-secondary {
        width: 100%;
    }

    .country-result {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .country-result form {
        grid-column: 1 / -1;
    }

    .country-live-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .country-live-row form {
        grid-column: 1 / -1;
    }

    .place-row {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .place-row form,
    .place-row .status-pill {
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .mini-button,
    .status-pill {
        width: 100%;
    }

    .image-form {
        grid-template-columns: 1fr;
    }

    .trip-item {
        display: grid;
    }

    .travel-dashboard {
        min-height: 0;
    }

    .dashboard-sidebar,
    .dashboard-content,
    .dashboard-rail {
        padding: 18px;
    }

    .sidebar-nav {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-top,
    .section-heading,
    .planner-title-row,
    .planner-empty {
        display: grid;
    }

    .dashboard-search-link {
        width: 100%;
    }

    .planner-form,
    .city-planner-slot {
        grid-template-columns: 1fr;
    }

    .planner-visual {
        min-height: 220px;
    }

    .planner-empty .add-trip-button {
        width: 96px;
    }
}
