/* user.css — Auth and profile pages */

.user-wrap {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px 64px;
    background: #001f5b;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
}

.user-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 36px 32px;
    width: 100%;
    max-width: 480px;
}

.user-box h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    text-align: center;
}

.user-box .sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    text-align: center;
    margin-bottom: 28px;
}

.user-logo {
    display: block;
    width: 160px;
    margin: 0 auto 24px;
}

.is-native-app .user-wrap {
    padding-top: 22px;
}

.is-native-app .user-logo {
    width: 136px;
    margin-bottom: 18px;
}

/* Form fields */
.user-box label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 5px;
}

.user-box input[type=text],
.user-box input[type=email],
.user-box input[type=password],
.user-box input[type=date],
.user-box input[type=time],
.user-box select,
.user-box .app-picker-proxy {
    width: 100%;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    font-family: inherit;
    margin-bottom: 16px;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.user-box .app-picker-proxy {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    cursor: pointer;
    min-height: 42px;
}

.user-box .app-picker-proxy .app-picker-proxy-value {
    color: #fff;
}

.user-box select option { background: #001f5b; }

.user-box input:focus,
.user-box select:focus,
.user-box .app-picker-proxy:focus { border-color: rgba(255,255,255,0.45); }

/* Checkbox row */
.user-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}
.user-check-row input[type=checkbox] {
    margin-top: 3px;
    flex-shrink: 0;
}
.user-check-row label {
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0;
    font-weight: normal;
}
.user-check-row a { color: #6fa8dc; }

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(180deg, #1466d6 0%, #0c56bf 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 11px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-secondary {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    font-weight: 600;
    padding: 9px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
}
.btn-secondary:hover { border-color: rgba(255,255,255,0.5); color: #fff; }

.btn-danger {
    width: 100%;
    background: rgba(200,40,40,0.2);
    border: 1px solid rgba(200,40,40,0.5);
    border-radius: 6px;
    color: #ff9090;
    font-size: 13px;
    font-weight: 600;
    padding: 9px;
    cursor: pointer;
    font-family: inherit;
    margin-top: 8px;
}
.btn-danger:hover { background: rgba(200,40,40,0.35); }

.pf-signout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 10px;
    color: rgba(255,255,255,0.82);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.pf-signout-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

/* Alerts */
.user-error {
    background: rgba(255,80,80,0.12);
    border: 1px solid rgba(255,80,80,0.4);
    border-radius: 6px;
    color: #ff9090;
    font-size: 13px;
    padding: 10px 12px;
    margin-bottom: 16px;
}
.user-success {
    background: rgba(60,180,60,0.12);
    border: 1px solid rgba(60,180,60,0.4);
    border-radius: 6px;
    color: #80e080;
    font-size: 13px;
    padding: 10px 12px;
    margin-bottom: 16px;
}
.user-info {
    background: rgba(80,140,255,0.1);
    border: 1px solid rgba(80,140,255,0.3);
    border-radius: 6px;
    color: #aac4ff;
    font-size: 13px;
    padding: 10px 12px;
    margin-bottom: 16px;
}

/* Divider */
.user-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 24px 0;
}

.user-links {
    font-size: 13px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    margin-top: 20px;
}
.user-links a { color: #6fa8dc; text-decoration: none; }
.user-links a:hover { text-decoration: underline; }

/* Profile page — wider */
.user-box.profile { max-width: 700px; }
.user-box.profile.pf-visited-page { max-width: 900px; }
.user-box.account-box { max-width: 560px; }

/* Section headers */
.user-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.35);
    margin: 28px 0 14px;
}
.user-section-title:first-child { margin-top: 0; }

.pf-page-nav {
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
}

.pf-page-nav-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.68);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.pf-page-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.pf-page-nav-link.active {
    color: #fff;
    background: rgba(20,102,214,0.28);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.pf-overview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 22px;
}

.pf-overview-card,
.pf-step,
.pf-builder-preview {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
}

.pf-overview-card {
    padding: 14px 16px;
}

.pf-overview-kicker,
.pf-step-kicker,
.pf-preview-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.38);
}

.pf-overview-title,
.pf-step-title {
    font-size: 15px;
    font-weight: 700;
    margin-top: 6px;
}

.pf-overview-copy,
.pf-step-copy {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255,255,255,0.52);
    margin-top: 6px;
}

.pf-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 20px;
}

.pf-stat-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
}

.pf-stat-card:hover {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
}

.pf-stat-value {
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.pf-stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.52);
}

.pf-dashboard-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 0 0 12px;
}

.pf-dashboard-link-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
}

.pf-dashboard-link-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.42);
}

.pf-dashboard-link-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.pf-dashboard-link-copy {
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.68);
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    border-radius: 10px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: filter 0.12s, background 0.12s, border-color 0.12s, color 0.12s;
}

.account-btn-primary {
    background: linear-gradient(180deg, #1466d6 0%, #0c56bf 100%);
    color: #fff;
}

.account-btn-primary:hover {
    filter: brightness(1.08);
}

.account-btn-secondary {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.82);
}

.account-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

/* Journey cards */
.journey-list { display: flex; flex-direction: column; gap: 10px; }

.journey-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-tracked-section {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 10px;
}

.pf-visited-section {
    background:
        radial-gradient(circle at top right, rgba(29,120,242,0.2), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.pf-visited-toolbar {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 10px;
    align-items: stretch;
    margin-top: 12px;
}

.pf-visited-stat,
.pf-visited-progress {
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 12px 14px;
}

.pf-visited-stat {
    min-width: 110px;
}

.pf-visited-stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
}

.pf-visited-stat-label {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.46);
}

.pf-visited-progress {
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.72);
}

.pf-visited-search-wrap {
    margin-top: 12px;
}

.pf-visited-map-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.pf-visited-map-tool {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.pf-visited-map-tool-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.46);
}

.pf-visited-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
}

.pf-visited-zoom-btn,
.pf-visited-map-reset {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.pf-visited-zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 18px;
    line-height: 1;
}

.pf-visited-zoom-btn:hover,
.pf-visited-map-reset:hover {
    background: rgba(255,255,255,0.14);
}

.pf-visited-zoom-value {
    min-width: 46px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
}

.pf-visited-map-reset {
    padding: 0 14px;
    min-height: 38px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.88);
    font-size: 13px;
    font-weight: 700;
}

.pf-visited-search {
    position: relative;
}

.pf-visited-search input {
    margin-bottom: 0;
}

.pf-visited-search-results {
    position: absolute;
    z-index: 25;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #081427;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.35);
    overflow: hidden;
}

.pf-visited-result {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.pf-visited-result:first-child {
    border-top: 0;
}

.pf-visited-result:hover {
    background: rgba(29,120,242,0.14);
}

.pf-visited-result:disabled {
    opacity: 0.55;
    cursor: default;
}

.pf-visited-result-main {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.pf-visited-result-main strong {
    font-size: 14px;
}

.pf-visited-result-main span {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
}

.pf-visited-result-state {
    font-size: 12px;
    font-weight: 700;
    color: #bcd5ff;
}

.pf-visited-map-wrap {
    position: relative;
    margin-top: 14px;
}

.pf-visited-map {
    height: 720px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    background:
        radial-gradient(circle at 20% 20%, rgba(29,120,242,0.26), transparent 25%),
        linear-gradient(180deg, rgba(225,236,248,0.98), rgba(205,221,236,0.95));
}

.pf-visited-map .maplibregl-ctrl-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.pf-visited-map-status {
    position: absolute;
    z-index: 4;
    top: 12px;
    left: 12px;
    max-width: min(420px, calc(100% - 24px));
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(6,19,39,0.84);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255,255,255,0.82);
    backdrop-filter: blur(6px);
}

.pf-visited-map-status.warn {
    background: rgba(68,44,6,0.88);
}

.pf-visited-map-status.error {
    background: rgba(84,16,28,0.9);
}

.pf-visited-result.is-visited {
    background: rgba(29,120,242,0.14);
}

.pf-visited-result.is-visited .pf-visited-result-state {
    color: #d7e7ff;
}

.pf-visited-map-popup .maplibregl-popup-content {
    padding: 0;
    border-radius: 16px;
    background: #f8f3ea;
    color: #16202b;
    box-shadow: 0 18px 44px rgba(0,0,0,0.28);
    overflow: hidden;
}

.pf-visited-map-popup .maplibregl-popup-tip {
    border-top-color: #f8f3ea;
}

.pf-visited-popup {
    min-width: 240px;
    padding: 16px;
}

.pf-visited-popup-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: #8f6d52;
}

.pf-visited-popup-title {
    margin-top: 6px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    color: #16202b;
}

.pf-visited-popup-code {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6f7d8b;
}

.pf-visited-popup-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    font-size: 12px;
    color: #5d6976;
}

.pf-visited-popup-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(20,102,214,0.12);
    color: #0c56bf;
    font-weight: 800;
}

.pf-visited-popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

.pf-visited-popup-link,
.pf-visited-popup-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.pf-visited-popup-link {
    background: #0c56bf;
    color: #fff;
}

.pf-visited-popup-link:hover {
    filter: brightness(1.06);
}

.pf-visited-popup-remove {
    border: 1px solid rgba(22,32,43,0.14);
    background: #fff;
    color: #243241;
}

.pf-visited-popup-remove:hover {
    background: #f2ebe0;
}

@media (max-width: 720px) {
    .pf-visited-toolbar {
        grid-template-columns: 1fr;
    }

    .pf-visited-map-tools {
        flex-direction: column;
        align-items: stretch;
    }

    .pf-visited-map-tool {
        justify-content: space-between;
    }

    .pf-visited-map-reset {
        width: 100%;
    }

    .pf-visited-map {
        height: 520px;
    }
}

.pf-feature-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
}

.pf-feature-link-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pf-feature-link-copy strong {
    font-size: 15px;
    color: #fff;
}

.pf-feature-link-copy span {
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,0.68);
}

.pf-feature-link-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: linear-gradient(180deg, #1466d6 0%, #0c56bf 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.pf-feature-link-btn:hover {
    filter: brightness(1.08);
}

.pf-page-back {
    margin-bottom: 16px;
}

.pf-page-back a {
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 13px;
}

.pf-page-back a:hover {
    color: #fff;
}

.pf-tracked-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.pf-tracked-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}

.pf-tracked-main {
    min-width: 0;
    flex: 1;
}

.pf-tracked-head,
.pf-tracked-submeta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.pf-tracked-head { margin-bottom: 6px; }

.pf-tracked-time {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.pf-tracked-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(20,102,214,0.18);
    color: #bcd5ff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pf-tracked-route {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.pf-tracked-meta,
.pf-tracked-submeta {
    font-size: 13px;
    color: rgba(255,255,255,0.54);
}

.pf-tracked-config {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(188,213,255,0.9);
}

.pf-tracked-notify-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.pf-tracked-notify-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.34);
}

.pf-tracked-notify-toggle {
    min-width: 72px;
    margin: 0;
}

.pf-tracked-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    grid-auto-rows: 40px;
    gap: 8px;
    min-width: 0;
    width: 100%;
    flex-shrink: 1;
}

.pf-tracked-edit,
.pf-tracked-open,
.pf-tracked-remove {
    width: 100%;
    height: 100%;
    min-height: 40px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0;
    box-sizing: border-box;
    white-space: normal;
    overflow-wrap: break-word;
}

.pf-tracked-empty {
    font-size: 13px;
    line-height: 1.6;
    color: rgba(255,255,255,0.56);
}

.journey-route {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
}
.journey-route .arrow { opacity: 0.4; margin: 0 6px; }

.pf-card-head {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.pf-mode-pill,
.pf-state-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pf-mode-pill {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.65);
}

.pf-state-pill.live {
    background: rgba(20,102,214,0.18);
    border: 1px solid rgba(20,102,214,0.45);
    color: #aac4ff;
}

.pf-state-pill.paused {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.48);
}

.journey-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    margin-top: 3px;
}

.pf-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 14px;
    margin-top: 12px;
}

.pf-card-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-card-item-wide {
    grid-column: 1 / -1;
}

.pf-card-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.34);
}

.pf-card-value {
    font-size: 12px;
    color: rgba(255,255,255,0.76);
}

.pf-card-note {
    font-size: 12px;
    color: rgba(255,255,255,0.46);
    line-height: 1.45;
}

.journey-delete {
    background: transparent;
    border: 1px solid rgba(255,80,80,0.35);
    border-radius: 6px;
    color: rgba(255,100,100,0.8);
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
}
.journey-delete:hover { border-color: rgba(255,80,80,0.7); color: #ff9090; }

.journey-edit-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 6px;
    color: rgba(255,255,255,0.72);
    font-size: 12px;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
}
.journey-edit-btn:hover {
    border-color: rgba(255,255,255,0.38);
    color: #fff;
}

/* Row layout for time fields */
.user-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.badge-unverified {
    display: inline-block;
    background: rgba(255,160,0,0.2);
    border: 1px solid rgba(255,160,0,0.5);
    color: #ffc060;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    padding: 2px 7px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ── Station autocomplete ─────────────────────────────────────────────────── */
.pf-ac-wrap {
    margin-bottom: 16px;
}

/* Use same specificity as .user-box input[type=text] to win the cascade */
.user-box .pf-ac-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    padding: 9px 12px;
    outline: none;
    margin: 0;
}
.user-box .pf-ac-input:focus { border-color: rgba(255,255,255,0.4); }

.pf-dropdown {
    position: fixed;
    background: #001a50;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 6px;
    z-index: 600;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
}
.pf-dropdown[hidden] { display: none !important; }

.pf-drop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    font-size: 13px;
    gap: 8px;
}
.pf-drop-item:last-child { border-bottom: none; }
.pf-drop-item:hover,
.pf-drop-item.active { background: rgba(255,255,255,0.1); }
.pf-drop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-drop-crs  { font-size: 10px; font-weight: 700; letter-spacing: 0.05em; color: rgba(255,255,255,0.35); flex-shrink: 0; }

/* ── Journey card actions ─────────────────────────────────────────────────── */
.journey-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Alert on/off toggle button */
.pf-alert-toggle {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}
.pf-alert-toggle.on {
    background: rgba(20,102,214,0.2);
    border-color: rgba(20,102,214,0.5);
    color: #aac4ff;
}
.pf-alert-toggle:disabled { opacity: 0.5; cursor: default; }

/* History cards */
.journey-card-history { opacity: 0.7; }
.journey-card-history .journey-route { color: rgba(255,255,255,0.65); }

.pf-status-sent   { color: #8cf0a8; font-weight: 600; }
.pf-status-nosend { color: rgba(255,255,255,0.35); }

/* ── Alert type radio toggle ──────────────────────────────────────────────── */
.pf-radio-group {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.pf-radio-group-stack {
    flex-direction: column;
    gap: 10px;
}

.pf-radio-label {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
    flex: 1;
    justify-content: center;
}
.pf-radio-label:has(input:checked) {
    background: rgba(20,102,214,0.25);
    border-color: rgba(20,102,214,0.6);
    color: #aac4ff;
}
.pf-radio-label input[type=radio] { accent-color: #4d90fe; }

.pf-mode-card {
    justify-content: flex-start;
    padding: 12px 14px;
}

.pf-mode-card span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.pf-mode-card strong {
    font-size: 13px;
}

.pf-mode-card small {
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255,255,255,0.52);
}

.pf-check-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0 0 16px;
}

.pf-check-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
}

.pf-check-card input[type=checkbox] {
    margin-top: 2px;
    accent-color: #4d90fe;
}

.pf-check-card span {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.user-box .pf-phase-channel {
    width: 160px;
    margin: 0 0 0 auto;
    flex-shrink: 0;
}

.pf-check-card strong {
    font-size: 13px;
}

.pf-check-card small {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255,255,255,0.52);
}

.pf-step {
    padding: 16px;
    margin-bottom: 16px;
}

.pf-edit-form {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 14px 16px;
    margin: -2px 0 10px;
}

.pf-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pf-edit-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.pf-check-group-compact {
    margin-bottom: 8px;
}

.pf-check-group-compact .pf-check-card {
    padding: 10px 12px;
}

.pf-step .user-row:last-child,
.pf-step .pf-ac-wrap:last-child {
    margin-bottom: 0;
}

.pf-help {
    margin-top: -6px;
    margin-bottom: 16px;
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.pf-builder-preview {
    padding: 14px 16px;
    margin: 10px 0 6px;
}

.pf-preview-main {
    font-size: 14px;
    font-weight: 700;
    margin-top: 6px;
}

.pf-preview-sub {
    font-size: 12px;
    line-height: 1.55;
    color: rgba(255,255,255,0.5);
    margin-top: 6px;
}

/* ── Train selector ───────────────────────────────────────────────────────── */
#train-section { margin-bottom: 4px; }
.pf-optional { font-size: 12px; color: rgba(255,255,255,0.35); font-weight: 400; }

/* ── Time input ───────────────────────────────────────────────────────────── */
.pf-time-input {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* ── Journey tabs ─────────────────────────────────────────────────────────── */
.journey-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 16px;
}
.journey-tab {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
}
.journey-tab:hover { color: rgba(255,255,255,0.7); }
.journey-tab.active {
    color: #fff;
    border-bottom-color: #4d90fe;
}
.journey-tab-panel { display: none; }
.journey-tab-panel.active { display: block; }

.pf-history-activity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 520px) {
    .user-wrap {
        padding: 14px 8px 108px;
    }

    .user-box {
        padding: 16px 12px;
        border-radius: 12px;
    }

    .user-box.profile { max-width: 100%; }

    .is-native-app .user-wrap {
        padding-top: 10px;
    }

    .user-box h1 {
        font-size: 20px;
        text-align: left;
    }

    .user-box .sub {
        text-align: left;
        margin-bottom: 18px;
    }

    .user-section-title {
        margin: 18px 0 10px;
    }

    .user-row { grid-template-columns: 1fr; }

    .journey-tabs {
        gap: 8px;
        border-bottom: none;
        margin-bottom: 14px;
    }

    .journey-tab {
        flex: 1;
        margin-bottom: 0;
        padding: 10px 12px;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 10px;
        background: rgba(255,255,255,0.04);
    }

    .journey-tab.active {
        border-bottom-color: rgba(20,102,214,0.6);
        background: rgba(20,102,214,0.18);
    }

    .journey-card {
        flex-wrap: wrap;
        padding: 12px 11px;
        gap: 9px;
    }

    .pf-tracked-card {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 11px;
        gap: 10px;
    }

    .pf-tracked-head {
        align-items: flex-start;
        gap: 8px;
    }

    .pf-tracked-time {
        font-size: 18px;
    }

    .pf-tracked-route {
        font-size: 15px;
        line-height: 1.35;
    }

    .pf-tracked-meta,
    .pf-tracked-submeta {
        line-height: 1.45;
    }

    .pf-tracked-config {
        line-height: 1.45;
    }

    .pf-tracked-notify-row {
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }

    .pf-tracked-notify-label {
        flex: 1;
    }

    .pf-tracked-notify-toggle {
        width: auto;
        min-width: 82px;
        min-height: 36px;
    }

    .pf-tracked-actions {
        width: 100%;
        flex-direction: row;
        gap: 8px;
        min-width: 0;
    }

    .pf-tracked-open,
    .pf-tracked-remove {
        flex: 1 1 0;
        min-height: 38px;
    }

    .journey-route {
        font-size: 14px;
    }

    .journey-meta {
        line-height: 1.45;
    }

    .journey-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .journey-edit-btn,
    .journey-delete,
    .pf-alert-toggle {
        width: 100%;
        min-height: 38px;
        text-align: center;
    }

    .pf-step {
        padding: 13px 11px;
        margin-bottom: 12px;
    }

    .pf-step-title,
    .pf-overview-title {
        font-size: 14px;
    }

    .pf-step-copy,
    .pf-overview-copy {
        font-size: 12px;
    }

    .pf-edit-grid { grid-template-columns: 1fr; }
    .pf-edit-actions {
        flex-direction: column;
        justify-content: stretch;
    }

    .pf-edit-form {
        padding: 12px 11px;
        margin: 0 0 10px;
    }

    .pf-check-card {
        flex-wrap: wrap;
        padding: 9px 10px;
    }

    .user-box .pf-phase-channel {
        width: 100%;
        margin: 10px 0 0;
    }

    .pf-overview,
    .pf-card-grid { grid-template-columns: 1fr; }

    .pf-overview {
        gap: 10px;
        margin-bottom: 16px;
    }

    .pf-stats-grid,
    .pf-dashboard-links {
        grid-template-columns: 1fr;
    }

    .pf-tracked-section {
        padding: 12px 11px;
    }

    .pf-visited-section {
        padding: 12px 11px;
    }

    .pf-visited-toolbar {
        grid-template-columns: 1fr;
    }

    .pf-visited-map {
        height: 300px;
    }

    .pf-feature-link-card {
        flex-direction: column;
        align-items: stretch;
    }

    .pf-page-nav {
        flex-direction: column;
    }

    .user-box input[type=text],
    .user-box input[type=email],
    .user-box input[type=password],
    .user-box input[type=date],
    .user-box input[type=time],
    .user-box select,
    .user-box .app-picker-proxy {
        margin-bottom: 12px;
        min-height: 40px;
    }

    #push-controls {
        flex-direction: column;
        align-items: stretch;
    }

    #push-controls .pf-alert-toggle,
    #push-controls .btn-secondary,
    #push-controls button {
        width: 100%;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 42px;
    }
}
