/* ============================================================
   Account Pages — scoped to .account-page
   Covers: PIN/access-code login (tour-check) AND the
   logged-in pax dashboard (details). Designed to live next
   to style.css / responsive.css / tour-page.css / register-page.css
   without overriding shared selectors.
   ============================================================ */

.account-page {
    --ap-radius: 14px;
    --ap-radius-sm: 10px;
    --ap-border: #e6e7ea;
    --ap-border-strong: #c8cad0;
    --ap-surface: #ffffff;
    --ap-surface-2: #f6f6f3;
    --ap-ink: #1a1a1a;
    --ap-ink-2: #4a4e56;
    --ap-muted: #7a7d83;
    --ap-accent: var(--theme-color);
    --ap-accent-soft: rgba(175, 0, 0, 0.08);
    --ap-accent-soft-2: rgba(175, 0, 0, 0.04);
    --ap-success: #1d8a4a;
    --ap-success-soft: rgba(29, 138, 74, 0.10);
    --ap-warning: #b45309;
    --ap-info: #1e6fb8;
    --ap-info-soft: rgba(30, 111, 184, 0.08);
    --ap-shadow: 0 6px 24px rgba(20, 20, 25, 0.08);
    --ap-shadow-lg: 0 18px 50px rgba(20, 20, 25, 0.18);
    color: var(--ap-ink-2);
    background: #fbfaf7;
    padding-bottom: 80px;
}

/* ============================================================
   PART 1 — PIN / ACCESS CODE LOGIN
   ============================================================ */

.ap-login-shell {
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 0;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}
/* Poster image — visible immediately as the iframe loads, and serves
   as the fallback if the video is blocked (e.g. cookie-restricted browsers). */
.ap-login-bg {
    position: absolute;
    inset: 0;
    z-index: -3;
    background-size: cover !important;
    background-position: center center !important;
    transform: scale(1.05);
    filter: saturate(.85);
}
/* Background video wrapper — sizes the iframe to fully cover the section
   while preserving the YouTube embed's 16:9 aspect ratio (no letterboxing).
   pointer-events:none prevents the iframe from stealing scroll/click. */
.ap-login-video {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}
.ap-login-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* The larger of 16:9 vs. viewport ratio wins — guarantees full coverage */
    width: 177.78vh;
    height: 56.25vw;
    min-width: 100%;
    min-height: 100%;
    border: 0;
    pointer-events: none;
}
.ap-login-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(135deg, rgba(15,15,20,0.55) 0%, rgba(30,15,15,0.45) 50%, rgba(15,15,20,0.7) 100%);
}
/* The .container wrapper centers horizontally; the flex on .ap-login-shell
   centers vertically. margin:0 auto explicitly centers the card inside the
   container in case the container is wider than the card. */
.ap-login-card {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    background: #fff;
    border-radius: 18px;
    padding: 44px 44px 38px;
    box-shadow: 0 30px 80px rgba(0,0,0,.25);
    text-align: center;
    color: var(--ap-ink-2);
}
.ap-login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--ap-accent-soft);
    color: var(--ap-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.ap-login-eyebrow {
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--ap-muted);
    font-size: 11px;
    font-weight: 700;
    margin: 0 0 8px;
}
.ap-login-card h1 {
    color: var(--ap-ink);
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 8px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.ap-login-sub {
    color: var(--ap-muted);
    font-size: 14.5px;
    line-height: 1.55;
    margin: 0 0 26px;
}
.ap-login-form { text-align: left; }
.ap-login-form .ap-field { margin-bottom: 14px; }
.ap-login-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ap-ink);
    margin-bottom: 6px;
}
.ap-login-form input[type="email"],
.ap-login-form input[type="text"] {
    width: 100%;
    padding: 13px 16px;
    background: #fff;
    border: 1px solid var(--ap-border-strong);
    border-radius: var(--ap-radius-sm);
    font-size: 15px;
    color: var(--ap-ink);
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
}
.ap-login-form input:focus {
    outline: 0;
    border-color: var(--ap-accent);
    box-shadow: 0 0 0 3px var(--ap-accent-soft);
}
/* OTP-style 4-digit input */
.ap-login-form input.ap-otp {
    text-align: center;
    letter-spacing: .55em;
    font-size: 22px;
    font-weight: 700;
    padding-right: 16px;
}
.ap-login-form .ap-field-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--ap-muted);
}
.ap-login-form .ap-forgot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ap-accent);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 6px;
    cursor: pointer;
    background: none;
    border: 0;
    padding: 0;
}
.ap-login-form .ap-forgot:hover { text-decoration: underline; }
.ap-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 22px;
    background: var(--ap-accent);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    margin-top: 10px;
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ap-login-btn:hover { background: #8a0000; box-shadow: 0 10px 26px rgba(175,0,0,.3); transform: translateY(-1px); }
.ap-login-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

.ap-login-tour-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--ap-accent-soft);
    color: var(--ap-accent);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
    max-width: 100%;
}
.ap-login-tour-pill i { font-size: 12px; }
.ap-login-tour-pill span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}

.ap-login-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--ap-border);
    font-size: 12.5px;
    color: var(--ap-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: center;
    align-items: center;
}
.ap-login-foot i { color: var(--ap-success); margin-right: 4px; }

@media (max-width: 575px) {
    .ap-login-card { padding: 32px 22px 28px; }
    .ap-login-card h1 { font-size: 22px; }
}

/* Choice list shown when user has multiple trips bound to the email */
.ap-tour-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--ap-border-strong);
    border-radius: var(--ap-radius-sm);
    cursor: pointer;
    background: #fff;
    margin-bottom: 10px;
    transition: all .15s ease;
}
.ap-tour-choice:hover { border-color: var(--ap-accent); background: var(--ap-accent-soft-2); }
.ap-tour-choice.register_selected {
    border-color: var(--ap-accent);
    background: var(--ap-accent-soft-2);
    box-shadow: inset 0 0 0 1px var(--ap-accent);
}
.ap-tour-choice .ap-tour-choice-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--ap-accent-soft);
    color: var(--ap-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.ap-tour-choice .ap-tour-choice-name {
    flex: 1;
    font-size: 14px;
    color: var(--ap-ink);
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ap-tour-choice .ap-tour-choice-arrow { color: var(--ap-muted); }
/* keep old class names working in case the AJAX response inserts the old markup */
.tour-overview.tour-register-overview { /* fallback if old markup is injected */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--ap-border-strong);
    border-radius: var(--ap-radius-sm);
    cursor: pointer;
    background: #fff;
    margin-bottom: 10px;
    transition: all .15s ease;
    color: var(--ap-ink);
}
.tour-overview.tour-register-overview.register_selected {
    border-color: var(--ap-accent);
    background: var(--ap-accent-soft-2);
}

/* ============================================================
   PART 2 — LOGGED-IN DETAILS DASHBOARD
   ============================================================ */

/* Hero */
.ap-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #fff;
    padding: 56px 0 50px;
    margin-bottom: 32px;
}
.ap-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-size: cover !important;
    background-position: center center !important;
    filter: saturate(.9);
}
.ap-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(120deg, rgba(15,15,20,0.85) 0%, rgba(45,15,15,0.65) 60%, rgba(15,15,20,0.9) 100%);
}
.ap-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 16px;
}
.ap-hero-eyebrow i { font-size: 12px; color: #ffd87a; }
.ap-hero h1 {
    color: #fff;
    font-size: clamp(24px, 3.2vw, 36px);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 8px;
    letter-spacing: -0.01em;
    max-width: 30ch;
    text-wrap: balance;
}
.ap-hero-trip-name {
    color: rgba(255,255,255,0.88);
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 14px;
    max-width: 60ch;
}
.ap-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    font-weight: 500;
}
.ap-hero-meta i { color: #ffd87a; margin-right: 6px; }
.ap-hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,0.5); align-self: center; }

/* Countdown ribbon */
.ap-countdown {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 999px;
    margin-top: 22px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}
.ap-countdown strong { color: #ffd87a; font-size: 22px; line-height: 1; }
.ap-countdown small { font-weight: 500; opacity: .85; font-size: 12.5px; }

@media (max-width: 767px) {
    .ap-hero { padding: 36px 0 32px; margin-bottom: 22px; }
    .ap-hero-trip-name { font-size: 15px; }
    .ap-hero-meta { font-size: 13px; gap: 4px 16px; }
}

/* Body grid */
.ap-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 991px) { .ap-body { grid-template-columns: 1fr; gap: 22px; } }

/* Cards */
.ap-card {
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    overflow: hidden;
    margin-bottom: 16px;
}
.ap-card-body { padding: 22px 24px; }
.ap-card-tight { padding: 16px 18px; }
.ap-card-dark { background: #161a23; color: #d5d8df; border: 0; }
.ap-card-dark h3, .ap-card-dark h4 { color: #fff; }

/* Eyebrow used on cards & sidebar */
.ap-eyebrow {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 11px;
    color: var(--ap-muted);
    font-weight: 700;
    margin: 0 0 14px;
}

/* Section headers on tab content */
.ap-section-head {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 0 0 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--ap-border);
}
.ap-section-head h2 {
    font-size: 20px;
    color: var(--ap-ink);
    margin: 0 0 4px;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.ap-section-head p { margin: 0; font-size: 14px; color: var(--ap-muted); line-height: 1.5; }
.ap-section-head .ap-section-tools { margin-left: auto; flex-shrink: 0; }

/* ============================================================
   Tab navigation — restyles the existing .tabset radio-tab markup
   ============================================================ */
.account-page .tabset {
    margin-bottom: 24px;
    background: transparent;
}
.account-page .tabset > input[type="radio"] {
    position: absolute;
    left: -200vw;
    opacity: 0;
}
.account-page .tabset > label {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--ap-border);
    border-radius: 999px;
    margin: 0 6px 8px 0;
    background: #fff;
    color: var(--ap-ink-2);
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1;
}
.account-page .tabset > label::after { display: none !important; }
.account-page .tabset > label:hover {
    border-color: var(--ap-accent);
    color: var(--ap-accent);
}
.account-page .tabset > input:checked + label {
    background: var(--ap-accent);
    border-color: var(--ap-accent);
    color: #fff;
    box-shadow: 0 6px 16px rgba(175, 0, 0, .25);
    margin-bottom: 8px;
}
.account-page .tabset > label i { font-size: 13px; }

/* Tab panel */
.account-page .tab-panels {
    border-top: 0 !important;
    padding-top: 0 !important;
}
.account-page .tabset .tab-panel {
    display: none;
    padding: 0;
    border-top: 0;
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    padding: 28px 32px;
    margin-bottom: 14px;
    scroll-margin-top: 80px;
}
.account-page .tabset .tab-panel.d-block {
    display: block;
}
/* Default first panel visible (radio-based CSS fallback) */
.account-page .tabset > input:first-child:checked ~ .tab-panels > .tab-panel:first-child {
    display: block;
}
@media (max-width: 575px) {
    .account-page .tabset .tab-panel { padding: 22px 18px; }
    .account-page .tabset > label { padding: 9px 14px; font-size: 12.5px; }
}

/* Override: inner tabs (the per-pax invoice sub-tabs) — quieter style */
.account-page .tabset .tabset > label {
    padding: 7px 14px;
    font-size: 12.5px;
}
.account-page .tabset .tab-panel.inner_tab {
    padding: 22px 24px;
    margin-top: 14px;
}

/* ============================================================
   Overview tab pieces
   ============================================================ */
.ap-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 575px) { .ap-overview-grid { grid-template-columns: 1fr; } }
.ap-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--ap-surface-2);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
}
.ap-stat-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--ap-accent-soft);
    color: var(--ap-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.ap-stat-label {
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: .06em;
    color: var(--ap-muted);
    font-weight: 600;
    margin: 0 0 3px;
}
.ap-stat-value {
    font-size: 15px;
    color: var(--ap-ink);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

/* Overview key/value list */
.ap-kv-list { list-style: none; margin: 0; padding: 0; }
.ap-kv-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-top: 1px solid var(--ap-border);
    font-size: 14px;
    color: var(--ap-ink-2);
}
.ap-kv-list li:first-child { border-top: 0; padding-top: 4px; }
.ap-kv-list li .ap-kv-k { color: var(--ap-muted); font-weight: 500; }
.ap-kv-list li .ap-kv-v { color: var(--ap-ink); font-weight: 600; text-align: right; }

.ap-overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

/* ============================================================
   Buttons used in dashboard
   ============================================================ */
.ap-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
    text-decoration: none;
    line-height: 1;
}
.ap-btn-primary { background: var(--ap-accent); color: #fff; border-color: var(--ap-accent); }
.ap-btn-primary:hover { background: #8a0000; color: #fff; box-shadow: 0 8px 22px rgba(175,0,0,.3); transform: translateY(-1px); }
.ap-btn-outline { background: #fff; color: var(--ap-ink); border-color: var(--ap-border-strong); }
.ap-btn-outline:hover { border-color: var(--ap-accent); color: var(--ap-accent); }
.ap-btn-dark { background: #161a23; color: #fff; border-color: #161a23; }
.ap-btn-dark:hover { background: #000; color: #fff; border-color: #000; }
.ap-btn-block { width: 100%; justify-content: center; }
.ap-btn-sm { padding: 8px 14px; font-size: 12.5px; }
.ap-btn-disabled { opacity: .65; cursor: not-allowed; }

/* ============================================================
   Documents tab
   ============================================================ */
.ap-docs-card {
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    overflow: hidden;
    margin-bottom: 18px;
}
.ap-docs-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--ap-surface-2);
    border-bottom: 1px solid var(--ap-border);
}
.ap-docs-card-head h4 {
    margin: 0;
    font-size: 15px;
    color: var(--ap-ink);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.ap-docs-card-head h4 i { color: var(--ap-accent); }
.ap-docs-card-head .ap-section-tools { margin-left: auto; }
.ap-docs-card-body { padding: 6px 8px; }
.ap-docs-card-body .table {
    margin: 0;
    font-size: 14px;
    color: var(--ap-ink-2);
}
.ap-docs-card-body .table th {
    color: var(--ap-muted);
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: .06em;
    font-weight: 700;
    border-bottom: 1px solid var(--ap-border) !important;
    background: transparent !important;
}
.ap-docs-card-body .table td { vertical-align: middle; }
.ap-empty {
    padding: 36px 22px;
    text-align: center;
    color: var(--ap-muted);
}
.ap-empty i { font-size: 36px; color: var(--ap-border-strong); margin-bottom: 12px; display: block; }
.ap-empty h4 { font-size: 15px; color: var(--ap-ink); margin: 0 0 6px; font-weight: 700; }
.ap-empty p { font-size: 13.5px; line-height: 1.5; margin: 0 auto; max-width: 40ch; }

/* ============================================================
   Flights tab
   ============================================================ */
.ap-flight-card {
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    overflow: hidden;
    margin-bottom: 14px;
}
.ap-flight-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: var(--ap-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}
.ap-flight-card-head .ap-leg-label { color: rgba(255,255,255,0.65); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.ap-flight-card-body {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 18px;
    padding: 18px 20px;
    align-items: center;
}
.ap-flight-leg {
    text-align: center;
}
.ap-flight-leg-time {
    font-size: 24px;
    font-weight: 700;
    color: var(--ap-ink);
    line-height: 1;
    margin: 0 0 4px;
}
.ap-flight-leg-code {
    font-size: 13px;
    font-weight: 700;
    color: var(--ap-accent);
    letter-spacing: .04em;
    margin: 0 0 4px;
}
.ap-flight-leg-city {
    font-size: 12.5px;
    color: var(--ap-muted);
    line-height: 1.4;
    margin: 0;
}
.ap-flight-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ap-muted);
    font-size: 11.5px;
}
.ap-flight-divider .ap-flight-line {
    width: 90px;
    height: 1px;
    background: var(--ap-border-strong);
    position: relative;
}
.ap-flight-divider .ap-flight-line::before {
    content: "\f072"; /* fa-plane */
    font-family: "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome";
    font-weight: 900;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    color: var(--ap-accent);
    background: #fff;
    padding: 0 6px;
    font-size: 12px;
}
.ap-flight-meta {
    padding: 12px 20px;
    border-top: 1px solid var(--ap-border);
    background: var(--ap-surface-2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 12.5px;
    color: var(--ap-muted);
}
.ap-flight-meta strong { color: var(--ap-ink); font-weight: 600; }
@media (max-width: 575px) {
    .ap-flight-card-body { grid-template-columns: 1fr; gap: 12px; }
    .ap-flight-divider .ap-flight-line { width: 1px; height: 30px; }
    .ap-flight-divider .ap-flight-line::before { transform: translate(-50%, -50%) rotate(90deg); }
}

/* ============================================================
   Logistics tab — improved cards
   ============================================================ */
.ap-logistics-group { margin-bottom: 28px; }
.ap-logistics-group:last-child { margin-bottom: 0; }
.ap-logistics-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--ap-ink);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.ap-logistics-group-title .ap-count {
    margin-left: auto;
    background: var(--ap-surface-2);
    border: 1px solid var(--ap-border);
    color: var(--ap-muted);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: none;
    letter-spacing: 0;
}
.ap-logistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.ap-log-item {
    background: var(--ap-surface-2);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    padding: 14px 16px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ap-log-item:hover { border-color: var(--ap-accent); box-shadow: var(--ap-shadow); }
.ap-log-item-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.ap-log-item-head .ap-log-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--ap-accent-soft);
    color: var(--ap-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.ap-log-item-name {
    margin: 0;
    font-size: 14.5px;
    color: var(--ap-ink);
    font-weight: 700;
}
.ap-log-item-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: var(--ap-ink-2);
    padding: 4px 0;
}
.ap-log-item-row .ap-log-label {
    color: var(--ap-muted);
    font-size: 12px;
    min-width: 70px;
}
.ap-log-item-row a { color: var(--ap-accent); text-decoration: none; }
.ap-log-item-row a:hover { text-decoration: underline; }
.ap-log-dates {
    display: flex;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 12.5px;
}
.ap-log-dates > div { line-height: 1.3; }
.ap-log-dates .ap-log-label { display: block; font-size: 10.5px; color: var(--ap-muted); margin-bottom: 2px; }

/* ============================================================
   Invoice tab
   ============================================================ */
.ap-invoice-card {
    background: #fff;
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow);
    overflow: hidden;
    margin-bottom: 14px;
}
.ap-invoice-head {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: space-between;
    padding: 22px 26px;
    background: var(--ap-surface-2);
    border-bottom: 1px solid var(--ap-border);
}
.ap-invoice-head-info p { margin: 0; }
.ap-invoice-head-info .ap-eyebrow { margin-bottom: 4px; }
.ap-invoice-head-info h3 {
    font-size: 18px;
    color: var(--ap-ink);
    font-weight: 700;
    margin: 0 0 4px;
}
.ap-invoice-head-info .ap-invoice-dates {
    color: var(--ap-muted);
    font-size: 13px;
}
.ap-invoice-head-balance {
    text-align: right;
}
.ap-invoice-head-balance .ap-eyebrow { margin-bottom: 4px; }
.ap-invoice-head-balance .ap-balance-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--ap-accent);
    line-height: 1;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
}
.ap-invoice-head-balance .ap-balance-paid {
    color: var(--ap-success);
    font-size: 12.5px;
    font-weight: 600;
}
.ap-invoice-body { padding: 22px 26px; }

.ap-invoice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 22px;
}
@media (max-width: 575px) { .ap-invoice-grid { grid-template-columns: 1fr; } }
.ap-invoice-grid-cell .ap-eyebrow { margin-bottom: 6px; }
.ap-invoice-grid-cell p { margin: 0 0 3px; color: var(--ap-ink); font-size: 14px; line-height: 1.5; }
.ap-invoice-grid-cell p.muted { color: var(--ap-muted); font-size: 13px; }

.ap-invoice-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}
.ap-invoice-table thead th {
    text-align: left;
    color: var(--ap-muted);
    font-size: 11.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px 14px;
    border-bottom: 1px solid var(--ap-border);
    background: var(--ap-surface-2);
}
.ap-invoice-table thead th.right { text-align: right; }
.ap-invoice-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--ap-border);
    color: var(--ap-ink-2);
}
.ap-invoice-table tbody td.right { text-align: right; color: var(--ap-ink); font-weight: 600; }
.ap-invoice-table tbody td.activity { color: var(--ap-ink); font-weight: 600; }
.ap-invoice-table tbody td.description { color: var(--ap-muted); font-size: 13px; }
.ap-invoice-table .ap-row-total td {
    padding-top: 18px;
    color: var(--ap-ink);
    font-weight: 700;
    border-bottom: 0;
}
.ap-invoice-table .ap-row-total td.right { font-size: 16px; }
.ap-invoice-table .ap-row-balance td {
    color: var(--ap-accent);
    font-weight: 700;
    border-top: 2px solid var(--ap-ink);
    border-bottom: 0;
}
.ap-invoice-table .ap-row-balance td.right { font-size: 20px; }

.ap-invoice-payment-btn { margin-bottom: 16px; }

/* ============================================================
   Sidebar (right column) — scrolls naturally with the page
   ============================================================ */
.ap-sidebar { /* no sticky positioning on the account dashboard */ }
.ap-side-tour {
    position: relative;
    overflow: hidden;
}
.ap-side-tour-img { width: 100%; height: 120px; object-fit: cover; display: block; }
.ap-side-tour-body { padding: 16px 20px; }
.ap-side-tour-body h3 {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--ap-ink);
    font-weight: 700;
    line-height: 1.3;
}
.ap-side-tour-meta { color: var(--ap-muted); font-size: 12.5px; }
.ap-side-tour-meta i { color: var(--ap-accent); margin-right: 4px; }

.ap-quick-actions {
    display: grid;
    gap: 8px;
}
.ap-quick-actions a, .ap-quick-actions button {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    background: var(--ap-surface-2);
    border: 1px solid var(--ap-border);
    border-radius: var(--ap-radius-sm);
    color: var(--ap-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: all .15s ease;
}
.ap-quick-actions a:hover, .ap-quick-actions button:hover {
    border-color: var(--ap-accent);
    background: var(--ap-accent-soft-2);
    color: var(--ap-accent);
}
.ap-quick-actions i {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--ap-accent-soft);
    color: var(--ap-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
}
.ap-side-link-list { list-style: none; margin: 0; padding: 0; }
.ap-side-link-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--ap-ink-2);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid var(--ap-border);
}
.ap-side-link-list li:first-child a { border-top: 0; }
.ap-side-link-list a i { width: 18px; color: var(--ap-muted); font-size: 13px; }
.ap-side-link-list a:hover { color: var(--ap-accent); }
.ap-side-link-list a:hover i { color: var(--ap-accent); }

/* Mini package summary in sidebar — preserves old IDs for the existing JS */
.ap-package-summary p { margin: 0; padding: 8px 0; display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ap-ink-2); border-top: 1px solid var(--ap-border); }
.ap-package-summary p:first-child { border-top: 0; padding-top: 4px; }
.ap-package-summary p span:last-child { color: var(--ap-ink); font-weight: 600; }
.ap-package-summary p.ap-pkg-total {
    border-top: 2px solid var(--ap-ink);
    padding-top: 12px;
    margin-top: 6px;
    color: var(--ap-ink);
    font-weight: 700;
}
.ap-package-summary p.ap-pkg-total span:last-child { font-size: 18px; }

/* ============================================================
   Misc helpers + legacy attachment modal cosmetics
   ============================================================ */
.account-page .modal-content {
    border-radius: var(--ap-radius);
    border: 0;
    box-shadow: var(--ap-shadow-lg);
}
.account-page .modal-header {
    border-bottom: 1px solid var(--ap-border);
    padding: 18px 22px;
}
.account-page .modal-header .modal-title {
    font-size: 17px;
    color: var(--ap-ink);
    font-weight: 700;
}
.account-page .modal-body { padding: 22px; }
.account-page .modal-footer { border-top: 1px solid var(--ap-border); padding: 14px 22px; }
.account-page .modal-body label.col-form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ap-ink);
    margin-bottom: 6px;
}
.account-page .modal-body .form-control {
    padding: 11px 14px;
    border: 1px solid var(--ap-border-strong);
    border-radius: var(--ap-radius-sm);
    font-size: 14px;
}
.account-page .modal-body .form-control:focus {
    outline: 0;
    border-color: var(--ap-accent);
    box-shadow: 0 0 0 3px var(--ap-accent-soft);
}

/* Hide any leftover .breadcrumb chrome if present */
.account-page + .breadcrumbs,
.account-page .breadcrumbs { display: none; }
