/*
 * Halaman agen publik: /agent (daftar) dan /agent/detail/:id (detail). 2026-10-18.
 * Dimuat layout frontend.ctp HANYA di dua halaman itu (di luar bundel CSS).
 * montserrat-override.css memaksa font-weight !important pada p/span/div/a/label/h*,
 * jadi setiap bobot di sini ikut !important.
 */
:root {
    --ag-red: #e0261c;
    --ag-red-dark: #b3170e;
    --ag-red-soft: #fdeceb;
    --ag-ink: #1b2230;
    --ag-slate: #586174;
    --ag-line: #e3e6ec;
    --ag-paper: #f4f5f8;
    --ag-open: #0d7a44;
    --ag-open-bg: #e2f4e9;
    --ag-closed: #5c6474;
    --ag-closed-bg: #eceef2;
    --ag-wa: #128048;
    --ag-radius: 14px;
    --ag-shadow: 0 1px 2px rgba(27, 34, 48, 0.05), 0 6px 20px rgba(27, 34, 48, 0.06);
}

.ag-page {
    background: var(--ag-paper);
    color: var(--ag-ink);
    padding: 0 0 56px;
}

.ag-page [hidden],
.ag-hero [hidden] {
    display: none !important;
}

.ag-page h2,
.ag-page h3 {
    color: var(--ag-ink);
    margin: 0;
    letter-spacing: 0;
}

.ag-muted {
    color: var(--ag-slate);
}

.ag-js-only {
    display: none !important;
}

html.ag-has-js .ag-date.ag-js-only {
    display: flex !important;
}

html.ag-has-js .ag-text-btn.ag-js-only {
    display: inline-flex !important;
}

/* ---------- Tombol ---------- */
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500 !important;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ag-btn:focus-visible,
.ag-text-btn:focus-visible,
.ag-view-btn:focus-visible,
.ag-pax-btn:focus-visible {
    outline: 3px solid rgba(224, 38, 28, 0.35);
    outline-offset: 2px;
}

.ag-btn i {
    font-size: 15px;
}

.ag-btn--primary {
    background: var(--ag-red);
    color: #fff !important;
}

.ag-btn--primary:hover {
    background: var(--ag-red-dark);
}

.ag-btn--primary[disabled] {
    opacity: 0.75;
    cursor: progress;
}

.ag-btn--wa {
    background: var(--ag-wa);
    color: #fff !important;
}

.ag-btn--wa:hover {
    background: #0c6a3a;
}

.ag-btn--ghost {
    background: #fff;
    border-color: var(--ag-line);
    color: var(--ag-ink) !important;
}

.ag-btn--ghost:hover {
    border-color: #c7ccd6;
    background: #fafbfc;
}

.ag-btn--soft {
    background: var(--ag-red-soft);
    color: var(--ag-red-dark) !important;
    min-height: 34px;
    padding: 0 14px;
}

.ag-btn--soft:hover {
    background: #fbd9d6;
}

.ag-btn--link {
    background: transparent;
    color: var(--ag-red-dark) !important;
    padding: 0 6px;
}

.ag-btn--link:hover {
    text-decoration: underline !important;
}

.ag-btn--light {
    background: #fff;
    color: var(--ag-red-dark) !important;
}

.ag-btn--light:hover {
    background: #fff4f3;
}

.ag-btn--outline-light {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff !important;
}

.ag-btn--outline-light:hover {
    background: rgba(255, 255, 255, 0.18);
}

.ag-btn--block {
    width: 100%;
    min-height: 50px;
    font-size: 16px;
}

.ag-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding: 2px 0;
    border: 0;
    background: none;
    color: var(--ag-red-dark);
    font-size: 13px;
    font-weight: 500 !important;
    cursor: pointer;
}

.ag-text-btn span {
    font-weight: 500 !important;
}

/* ---------- Status & tag ---------- */
.ag-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500 !important;
    line-height: 1.4;
    white-space: nowrap;
}

.ag-status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.ag-status--open {
    background: var(--ag-open-bg);
    color: var(--ag-open);
}

.ag-status--closed {
    background: var(--ag-closed-bg);
    color: var(--ag-closed);
}

.ag-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--ag-paper);
    color: var(--ag-slate);
    font-size: 12.5px;
    line-height: 1.4;
}

.ag-tag i {
    font-size: 11px;
}

.ag-tag--online {
    background: var(--ag-red-soft);
    color: var(--ag-red-dark);
}

/* ---------- Input ---------- */
.ag-input-wrap {
    position: relative;
}

.ag-input-wrap > i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8a92a3;
    font-size: 14px;
    pointer-events: none;
}

.ag-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px 0 40px;
    border: 1px solid #d6dae2;
    border-radius: 10px;
    background: #fff;
    color: var(--ag-ink);
    font-size: 15px;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.ag-input::placeholder {
    color: #8a92a3;
}

.ag-input:focus {
    outline: none;
    border-color: var(--ag-red);
    box-shadow: 0 0 0 3px rgba(224, 38, 28, 0.15);
}

.ag-select-wrap::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -6px;
    border-right: 2px solid #8a92a3;
    border-bottom: 2px solid #8a92a3;
    transform: rotate(45deg);
    pointer-events: none;
}

.ag-select-wrap .ag-input {
    padding-right: 40px;
    cursor: pointer;
}

.ag-input-wrap--sm .ag-input {
    height: 40px;
    font-size: 14px;
}

/* =========================================================
   DAFTAR AGEN
   ========================================================= */
.ag-header .modern-page-header-bg {
    padding: 56px 0 96px;
}

.ag-header .modern-page-title {
    font-size: 40px;
}

.ag-header-lead {
    max-width: 640px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.6;
}

.ag-filter {
    position: relative;
    z-index: 3;
    margin-top: -64px;
    padding: 18px 20px 16px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(27, 34, 48, 0.1);
}

.ag-filter-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.ag-filter-row--chips {
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ag-field {
    min-width: 0;
}

.ag-field--search {
    flex: 1.6 1 0;
}

.ag-field--city {
    flex: 1 1 0;
}

.ag-field-label {
    display: block;
    margin: 0 0 6px;
    color: var(--ag-slate);
    font-size: 13px;
    font-weight: 500 !important;
}

.ag-submit {
    height: 48px;
}

.ag-js .ag-submit {
    display: none;
}

.ag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.ag-chip {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.ag-chip input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ag-chip span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border: 1px solid var(--ag-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ag-ink);
    font-size: 13.5px;
    line-height: 1.3;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ag-chip span i {
    color: var(--ag-slate);
    font-size: 12px;
}

.ag-chip:hover span {
    border-color: #c7ccd6;
}

.ag-chip input:checked + span {
    background: var(--ag-red-soft);
    border-color: var(--ag-red);
    color: var(--ag-red-dark);
}

.ag-chip input:checked + span i {
    color: var(--ag-red-dark);
}

.ag-chip input:focus-visible + span {
    outline: 3px solid rgba(224, 38, 28, 0.35);
    outline-offset: 2px;
}

.ag-view-toggle {
    display: inline-flex;
    padding: 3px;
    border-radius: 10px;
    background: var(--ag-paper);
}

.ag-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ag-slate);
    font-size: 13.5px;
    cursor: pointer;
}

.ag-view-btn.is-active {
    background: #fff;
    color: var(--ag-ink);
    box-shadow: 0 1px 3px rgba(27, 34, 48, 0.12);
}

.ag-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 2px 6px;
}

.ag-result-count {
    margin: 0;
    color: var(--ag-slate);
    font-size: 14px;
}

.ag-reset {
    color: var(--ag-red-dark) !important;
    font-size: 14px;
    font-weight: 500 !important;
}

.ag-map-panel {
    margin-top: 10px;
}

.ag-map {
    position: relative;
    z-index: 0;
    height: 560px;
    border-radius: var(--ag-radius);
    overflow: hidden;
    background: #e8eaee;
    box-shadow: var(--ag-shadow);
}

.ag-map-note {
    margin: 10px 2px 0;
    color: var(--ag-slate);
    font-size: 13.5px;
}

.ag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.ag-card {
    display: flex;
    flex-direction: column;
    padding: 18px 18px 14px;
    background: #fff;
    border: 1px solid var(--ag-line);
    border-radius: var(--ag-radius);
}

.ag-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 8px;
    margin-bottom: 10px;
    min-height: 24px;
}

.ag-kind {
    color: var(--ag-slate);
    font-size: 12.5px;
    font-weight: 500 !important;
}

.ag-kind--point {
    color: #7a4b00;
}

.ag-card-title {
    margin: 0 !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

.ag-card-title a {
    color: var(--ag-ink) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.ag-card-title a:hover {
    color: var(--ag-red-dark) !important;
}

.ag-card-subtitle {
    margin: 2px 0 0;
    color: var(--ag-slate);
    font-size: 14px;
}

.ag-facts {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.ag-fact {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--ag-ink);
    font-size: 13.5px;
    line-height: 1.5;
}

.ag-fact > i {
    width: 14px;
    margin-top: 3px;
    color: var(--ag-red);
    font-size: 13px;
    text-align: center;
    flex: none;
}

.ag-fact--address span {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ag-fact a {
    color: var(--ag-ink) !important;
}

.ag-fact a.ag-more {
    margin-left: 6px;
    color: var(--ag-red-dark) !important;
    font-size: 12.5px;
}

.ag-card .ag-tags {
    margin-top: 6px;
}

.ag-card-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.ag-card-actions .ag-btn {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13.5px;
}

.ag-card-actions .ag-btn--link {
    margin-left: auto;
}

.ag-empty {
    max-width: 520px;
    margin: 40px auto 0;
    padding: 36px 28px;
    text-align: center;
    background: #fff;
    border: 1px dashed #cfd4dd;
    border-radius: var(--ag-radius);
}

.ag-empty > i {
    color: var(--ag-red);
    font-size: 34px;
}

.ag-empty h2 {
    margin: 14px 0 8px !important;
    font-size: 20px !important;
}

.ag-empty p {
    margin: 0 0 18px;
    color: var(--ag-slate);
    line-height: 1.6;
}

.ag-empty p a {
    color: var(--ag-red-dark) !important;
}

/* Pin peta */
.ag-pin-wrap {
    background: none;
    border: 0;
}

.ag-pin {
    display: block;
    width: 24px;
    height: 24px;
    margin: 2px 0 0 2px;
    border-radius: 50% 50% 50% 0;
    background: var(--ag-red);
    border: 3px solid #fff;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.ag-pin--active {
    background: var(--ag-red-dark);
}

.ag-popup strong {
    display: block;
    font-size: 14px;
    font-weight: 600 !important;
}

.ag-popup-status {
    display: block;
    margin: 2px 0 6px;
    color: var(--ag-slate);
    font-size: 12px;
}

.ag-popup a {
    color: var(--ag-red-dark) !important;
    font-weight: 500 !important;
}

/* =========================================================
   DETAIL AGEN
   ========================================================= */
.ag-hero {
    padding: 34px 0 40px;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.ag-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.75);
}

.ag-crumbs a {
    color: rgba(255, 255, 255, 0.92) !important;
}

.ag-crumbs span {
    color: rgba(255, 255, 255, 0.75);
}

.ag-hero-kind {
    margin: 22px 0 4px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.ag-hero-title {
    margin: 0 !important;
    color: #fff !important;
    font-size: 40px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    letter-spacing: -0.5px;
}

.ag-hero-subtitle {
    display: block;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 22px;
    font-weight: 400 !important;
    letter-spacing: 0;
}

.ag-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 16px;
}

.ag-status--hero {
    font-size: 13px;
    padding: 5px 12px 5px 10px;
}

.ag-status--hero.ag-status--open {
    background: #fff;
    color: var(--ag-open);
}

.ag-status--hero.ag-status--closed {
    background: rgba(255, 255, 255, 0.92);
    color: var(--ag-closed);
}

.ag-hero-hours {
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
}

.ag-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.ag-hero-actions .ag-btn {
    min-height: 44px;
}

.ag-page--detail {
    padding-top: 0;
}

.ag-notice {
    display: flex;
    gap: 14px;
    margin: 24px 0 0;
    padding: 16px 18px;
    position: relative;
    z-index: 2;
    background: #fff8e6;
    border: 1px solid #f1d38a;
    border-radius: var(--ag-radius);
    color: #5c4300;
}

.ag-notice > i {
    margin-top: 3px;
    font-size: 18px;
}

.ag-notice p {
    margin: 4px 0 0;
}

.ag-notice a {
    color: #5c4300 !important;
    text-decoration: underline !important;
}

.ag-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}

.ag-detail-main,
.ag-detail-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.ag-card-plain {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--ag-line);
    border-radius: var(--ag-radius);
}

.ag-section-title {
    margin-bottom: 14px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
}

.ag-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-bottom: 14px;
}

.ag-section-head .ag-section-title {
    margin-bottom: 0 !important;
}

.ag-section-head .ag-input-wrap {
    flex: 0 1 240px;
}

.ag-count {
    margin-left: 6px;
    color: var(--ag-slate);
    font-size: 13px;
    font-weight: 400 !important;
}

.ag-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.ag-book-offline p {
    margin: 0;
    color: var(--ag-slate);
    line-height: 1.6;
}

/* ---- Form tiket: tiket berangkat dengan sobekan ---- */
.ag-ticket {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(27, 34, 48, 0.12);
    position: relative;
}

.ag-ticket.is-flash {
    animation: ag-flash 0.9s ease;
}

@keyframes ag-flash {
    0% { box-shadow: 0 0 0 0 rgba(224, 38, 28, 0.45), 0 12px 34px rgba(27, 34, 48, 0.12); }
    100% { box-shadow: 0 0 0 14px rgba(224, 38, 28, 0), 0 12px 34px rgba(27, 34, 48, 0.12); }
}

.ag-ticket-main {
    padding: 24px 26px 22px;
    min-width: 0;
}

.ag-ticket-title {
    margin-bottom: 18px !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}

.ag-ticket-label {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    color: var(--ag-slate);
    font-size: 13px;
    font-weight: 500 !important;
}

.ag-ticket-route {
    position: relative;
    padding-left: 30px;
}

/* garis rute dari titik naik ke tujuan, ikut tinggi blok "Naik dari" */
.ag-ticket-from::after {
    content: '';
    position: absolute;
    left: -23px;
    top: 21px;
    bottom: -16px;
    border-left: 2px dashed #f0aaa5;
}

.ag-mark {
    position: absolute;
    left: -30px;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.ag-ticket-from,
.ag-ticket-to {
    position: relative;
}

.ag-mark--from {
    background: #fff;
    border: 4px solid var(--ag-red);
}

.ag-mark--to {
    background: var(--ag-red);
    box-shadow: 0 0 0 4px var(--ag-red-soft);
}

.ag-ticket-from {
    margin-bottom: 18px;
}

.ag-ticket-from strong {
    display: block;
    font-size: 17px;
    line-height: 1.35;
}

.ag-ticket-from-address {
    display: block;
    margin-top: 2px;
    color: var(--ag-slate);
    font-size: 13px;
    line-height: 1.5;
}

.ag-form-field {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
    min-width: 0;
}

.ag-form-field.has-error .ag-input {
    border-color: var(--ag-red);
    box-shadow: 0 0 0 3px rgba(224, 38, 28, 0.15);
}

.ag-field-error {
    margin: 6px 0 0;
    color: var(--ag-red-dark);
    font-size: 13px;
    font-weight: 500 !important;
}

.ag-field-error:empty {
    display: none;
}

.ag-date-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ag-date {
    display: flex;
    margin: 0;
    cursor: pointer;
}

.ag-date input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.ag-date > span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d6dae2;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ag-date strong {
    font-size: 14px;
    line-height: 1.3;
}

.ag-date small {
    color: var(--ag-slate);
    font-size: 12px;
}

.ag-date:hover > span {
    border-color: #b9bfcb;
}

.ag-date input:checked + span {
    border-color: var(--ag-red);
    background: var(--ag-red-soft);
    box-shadow: inset 0 0 0 1px var(--ag-red);
}

.ag-date input:checked + span small {
    color: var(--ag-red-dark);
}

.ag-date input:focus-visible + span {
    outline: 3px solid rgba(224, 38, 28, 0.35);
    outline-offset: 2px;
}

.ag-date--other > span {
    border-style: dashed;
}

.ag-date-picker {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ag-pax {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d6dae2;
    border-radius: 12px;
}

.ag-pax-btn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 9px;
    background: var(--ag-paper);
    color: var(--ag-ink);
    cursor: pointer;
}

.ag-pax-btn:hover:not([disabled]) {
    background: var(--ag-red-soft);
    color: var(--ag-red-dark);
}

.ag-pax-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.ag-pax-value {
    min-width: 86px;
    text-align: center;
    font-size: 15px;
    font-weight: 600 !important;
}

.ag-ticket .ag-form-field:last-child {
    margin-bottom: 0;
}

.ag-ticket-stub {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 24px 22px;
    border-left: 2px dashed var(--ag-line);
    background: #fffaf9;
    border-radius: 0 18px 18px 0;
    position: relative;
}

/* takik sobekan di ujung garis putus-putus */
.ag-ticket-stub::before,
.ag-ticket-stub::after {
    content: '';
    position: absolute;
    left: -13px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--ag-paper);
}

.ag-ticket-stub::before {
    top: -12px;
}

.ag-ticket-stub::after {
    bottom: -12px;
}

.ag-ticket-stub p {
    margin: 0;
    color: var(--ag-slate);
    font-size: 12.5px;
    line-height: 1.55;
}

/* ---- Daftar tujuan ---- */
.ag-dest-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-dest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef0f4;
}

.ag-dest-info {
    min-width: 0;
}

.ag-dest-name {
    display: block;
    font-size: 15px;
    line-height: 1.35;
}

.ag-dest-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    margin-top: 2px;
    color: var(--ag-slate);
    font-size: 12.5px;
}

.ag-dest-meta i {
    margin-right: 5px;
    font-size: 11px;
}

.ag-dest-note {
    color: #8a92a3;
    font-size: 12px;
    text-align: right;
    white-space: nowrap;
}

.ag-dest-empty {
    margin: 14px 0 0;
    color: var(--ag-slate);
}

.ag-footnote {
    margin: 14px 0 0;
    color: #8a92a3;
    font-size: 12.5px;
    line-height: 1.5;
}

/* ---- Kartu informasi ---- */
.ag-info-row {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #eef0f4;
}

.ag-info .ag-section-title + .ag-info-row {
    border-top: 0;
    padding-top: 2px;
}

.ag-info-row > i {
    width: 18px;
    margin-top: 2px;
    color: var(--ag-red);
    font-size: 16px;
    text-align: center;
    flex: none;
}

.ag-info-row > div {
    min-width: 0;
    flex: 1;
}

.ag-info-label {
    margin: 0 0 4px !important;
    color: var(--ag-slate) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.ag-info-value {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.ag-info-value a,
.ag-phone-list a {
    color: var(--ag-ink) !important;
    text-decoration: underline !important;
    text-decoration-color: #c9ced8 !important;
    text-underline-offset: 3px;
}

.ag-phone-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-phone-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    font-size: 14.5px;
}

.ag-phone-list .ag-muted {
    font-size: 12px;
}

.ag-week {
    display: flex;
    gap: 5px;
    margin: 2px 0 8px;
    padding: 0;
    list-style: none;
}

.ag-week li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    border-radius: 8px;
    font-size: 12px;
}

.ag-week li span {
    font-weight: 500 !important;
}

.ag-week .is-open {
    background: var(--ag-red-soft);
    color: var(--ag-red-dark);
}

.ag-week .is-closed {
    background: var(--ag-paper);
    color: #9aa1af;
    text-decoration: line-through;
}

.ag-week .is-today {
    box-shadow: inset 0 0 0 2px var(--ag-ink);
}

.ag-info .ag-tags {
    margin-top: 2px;
}

/* ---- Peta ---- */
.ag-detail-map {
    position: relative;
    z-index: 0;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    background: #e8eaee;
}

.ag-map-missing {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background: var(--ag-paper);
    color: var(--ag-slate);
    font-size: 14px;
    line-height: 1.5;
}

.ag-map-missing i {
    margin-top: 3px;
    color: var(--ag-red);
}

.ag-map-missing p {
    margin: 0;
}

.ag-location .ag-inline-actions .ag-btn {
    flex: 1 1 auto;
}

/* ---- Lokasi lain ---- */
.ag-others {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ag-others li + li {
    border-top: 1px solid #eef0f4;
}

.ag-others a {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 12px 0;
    color: var(--ag-ink) !important;
    text-decoration: none !important;
}

.ag-others a:hover strong {
    color: var(--ag-red-dark);
}

.ag-others .ag-muted {
    font-size: 13px;
    line-height: 1.45;
}

.ag-others .ag-status {
    margin-top: 4px;
}

.ag-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ag-red-dark) !important;
    font-size: 14px;
    font-weight: 500 !important;
}

.ag-mobile-bar {
    display: none;
}

/* ---------- Responsif ---------- */
@media (max-width: 991px) {
    .ag-detail {
        display: flex;
        flex-direction: column;
    }

    /* Urutan di layar sempit: pesan, kontak, lokasi, tujuan, lokasi lain */
    .ag-detail-main,
    .ag-detail-side {
        display: contents;
    }

    #pesan { order: 1; }
    #kontak { order: 2; }
    #lokasi { order: 3; }
    #tujuan { order: 4; }
    #agen-lain { order: 5; }
    .ag-back { order: 6; }

    .ag-detail > * + *,
    .ag-detail-main > section,
    .ag-detail-side > * {
        margin-top: 0;
    }

    .ag-detail {
        gap: 18px;
    }
}

@media (max-width: 767px) {
    .ag-header .modern-page-header-bg {
        padding: 36px 0 80px;
    }

    .ag-header .modern-page-title {
        font-size: 30px;
    }

    .ag-header-lead {
        font-size: 14.5px;
    }

    .ag-filter {
        margin-top: -56px;
        padding: 14px;
        border-radius: 14px;
    }

    .ag-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    /* nowrap wajib: kolom + wrap membuat lebar baris = lebar isi chip (meluber ke samping) */
    .ag-filter-row--chips {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 12px;
    }

    .ag-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin: 0 -14px;
        padding: 0 14px 2px;
        scrollbar-width: none;
    }

    .ag-chips::-webkit-scrollbar {
        display: none;
    }

    .ag-chip span {
        white-space: nowrap;
    }

    .ag-view-toggle {
        display: flex;
    }

    .ag-view-btn {
        flex: 1;
        justify-content: center;
    }

    .ag-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .ag-map {
        height: 70vh;
        min-height: 360px;
    }

    .ag-hero {
        padding: 22px 0 56px;
    }

    .ag-hero-kind {
        margin-top: 16px;
        font-size: 14px;
    }

    .ag-hero-title {
        font-size: 28px !important;
    }

    .ag-hero-subtitle {
        font-size: 17px;
    }

    .ag-hero-actions .ag-btn {
        flex: 1 1 auto;
    }

    .ag-ticket {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-ticket-main {
        padding: 20px 18px 18px;
    }

    .ag-ticket-stub {
        border-left: 0;
        border-top: 2px dashed var(--ag-line);
        border-radius: 0 0 18px 18px;
        padding: 18px;
    }

    .ag-ticket-stub::before,
    .ag-ticket-stub::after {
        top: -13px;
        bottom: auto;
    }

    .ag-ticket-stub::before {
        left: -12px;
    }

    .ag-ticket-stub::after {
        left: auto;
        right: -12px;
    }

    .ag-date-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ag-card-plain {
        padding: 18px 16px;
    }

    .ag-section-head .ag-input-wrap {
        flex: 1 1 100%;
    }

    .ag-dest-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .ag-page--detail {
        padding-bottom: 96px;
    }

    .ag-mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        gap: 8px;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        background: #fff;
        box-shadow: 0 -4px 18px rgba(27, 34, 48, 0.12);
    }

    .ag-mobile-bar-btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-height: 46px;
        border-radius: 10px;
        border: 1px solid var(--ag-line);
        color: var(--ag-ink) !important;
        font-size: 14px;
        font-weight: 500 !important;
        text-decoration: none !important;
    }

    .ag-mobile-bar-btn--wa {
        background: var(--ag-wa);
        border-color: var(--ag-wa);
        color: #fff !important;
    }

    .ag-mobile-bar-btn--primary {
        background: var(--ag-red);
        border-color: var(--ag-red);
        color: #fff !important;
    }
}

@media (max-width: 380px) {
    .ag-card-actions .ag-btn--link {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ag-ticket.is-flash {
        animation: none;
    }

    .ag-btn,
    .ag-chip span,
    .ag-date > span {
        transition: none;
    }
}
