:root{--ink:#172033;--muted:#6b7280;--brand:#12715b;--brand2:#0e4e75;--panel:#fff;--line:#e6eaf0}body{background:#f3f6f9;color:var(--ink)}.hero{padding:7rem 1rem;background:linear-gradient(135deg,#0d3547,#12805f);color:white;border-radius:1.5rem}.card{border:1px solid var(--line);box-shadow:0 .35rem 1.4rem rgba(31,41,55,.055);border-radius:1rem}.workspace-header{background:linear-gradient(120deg,#0d3547,#13765d);color:#fff;border-radius:1.2rem;padding:1.5rem}.workspace-cover{width:150px;height:105px;object-fit:cover;border-radius:.85rem;background:#dfe7eb}.nav-tabs .nav-link{font-weight:600;color:#4b5563}.nav-tabs .nav-link.active{color:var(--brand);border-bottom:3px solid var(--brand)}.section-title{font-size:1rem;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:700}.step-card{border-left:5px solid var(--brand)}.dropzone{border:2px dashed #9fb5bd;border-radius:1rem;padding:1.5rem;text-align:center;background:#f8fbfc;cursor:pointer;transition:.2s}.dropzone.dragover{border-color:var(--brand);background:#e8f5f1}.image-tile{position:relative}.image-tile img{width:100%;height:150px;object-fit:cover;border-radius:.75rem}.toast-area{position:fixed;right:1rem;top:5rem;z-index:2000;display:grid;gap:.6rem}.app-toast{background:#166534;color:#fff;padding:.8rem 1rem;border-radius:.7rem;box-shadow:0 8px 30px rgba(0,0,0,.18)}.app-toast.danger{background:#b42318}.required:after{content:' *';color:#dc3545}.form-label{font-weight:600}.muted-meta{color:var(--muted);font-size:.88rem}.cost-total{font-size:1.3rem;font-weight:700}.entity-toolbar{display:flex;gap:.5rem;flex-wrap:wrap}.modal-xl{--bs-modal-width:1140px}@media(max-width:768px){.workspace-cover{width:100%;height:180px}.workspace-header .d-flex{display:block!important}}

/* Homepage photographic carousel */
.homepage-hero{position:relative;min-height:clamp(470px,68vh,720px);overflow:hidden;border-radius:1.5rem;color:#fff;background:#0d3547;box-shadow:0 1rem 3rem rgba(15,23,42,.2)}
.homepage-hero .carousel,.homepage-hero .carousel-inner,.homepage-hero .carousel-item{position:absolute;inset:0;height:100%}
.homepage-hero-image{width:100%;height:100%;background-position:center;background-size:cover;transform:scale(1.02)}
.homepage-hero-overlay{position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(5,20,31,.78),rgba(5,20,31,.36) 55%,rgba(5,20,31,.52))}
.homepage-hero-content{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;max-width:850px;margin:auto;text-shadow:0 2px 18px rgba(0,0,0,.45)}
.homepage-hero-content .lead{max-width:720px;font-size:clamp(1.05rem,2vw,1.35rem)}
.homepage-hero .carousel-control-prev,.homepage-hero .carousel-control-next,.homepage-hero .carousel-indicators{z-index:3}

/* Interactive trip map */
.route-map-shell{border-radius:1.2rem}.trip-route-map{width:100%;height:clamp(520px,72vh,820px);background:#dbe7eb}
.route-number-marker{background:transparent;border:0}.route-number-marker span{display:grid;place-items:center;width:38px;height:38px;border:3px solid #fff;border-radius:50%;background:var(--brand);color:#fff;font-weight:800;box-shadow:0 5px 16px rgba(0,0,0,.35)}
.leaflet-popup-content-wrapper{padding:0;border-radius:1rem;overflow:hidden}.leaflet-popup-content{width:340px!important;margin:0}.map-step-popup h3{font-size:1.18rem;margin:.2rem 0 .3rem}.map-popup-carousel img,.map-popup-placeholder{height:190px;object-fit:cover}.map-popup-placeholder{display:grid;place-items:center;background:linear-gradient(135deg,#d8e8e3,#dbe5ee);color:#52606d;font-weight:600}.map-popup-image-caption{position:absolute;left:0;right:0;bottom:0;padding:.45rem .7rem;color:#fff;background:linear-gradient(transparent,rgba(0,0,0,.75));font-size:.78rem}.map-popup-kicker{text-transform:uppercase;letter-spacing:.08em;color:var(--brand);font-size:.72rem;font-weight:800}.map-popup-meta{color:var(--muted);font-size:.78rem;margin-bottom:.65rem}.map-popup-description{font-size:.88rem;line-height:1.45;max-height:135px;overflow:auto}.map-popup-carousel .carousel-control-prev,.map-popup-carousel .carousel-control-next{width:14%}
@media(max-width:576px){.homepage-hero{min-height:560px}.homepage-hero-overlay{background:rgba(5,20,31,.58)}.trip-route-map{height:68vh;min-height:480px}.leaflet-popup-content{width:270px!important}.map-popup-carousel img,.map-popup-placeholder{height:155px}}

/* Compact itinerary cards */
.step-card-compact{border-left-width:4px}
.step-card-compact .step-card-title{font-size:1.05rem;line-height:1.25}
.step-card-compact .step-card-description{font-size:.9rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.step-card-compact .muted-meta{font-size:.78rem}
.step-card-compact .image-tile img{height:105px}
.compact-dropzone{font-size:.84rem;border-width:1px;border-radius:.7rem}

/* Refined route map */
.trip-route-map{height:clamp(460px,68vh,760px);min-height:420px}
.route-number-marker span{width:34px;height:34px;font-size:.82rem;box-shadow:0 4px 14px rgba(15,23,42,.28)}
.leaflet-popup-content-wrapper{border-radius:.9rem;padding:0;overflow:hidden;box-shadow:0 12px 34px rgba(15,23,42,.2)}
.leaflet-popup-content{margin:0!important;width:auto!important}
.map-step-popup{width:260px;max-width:72vw;background:#fff}
.map-popup-media{height:120px;background:#e5e7eb;overflow:hidden}
.map-popup-media img{width:100%;height:100%;object-fit:cover}
.map-popup-body{padding:.8rem .9rem}
.map-popup-kicker{text-transform:uppercase;letter-spacing:.08em;font-size:.65rem;font-weight:800;color:var(--brand)}
.map-step-popup h3{font-size:1rem;margin:.15rem 0 .25rem}
.map-popup-meta,.map-popup-count{font-size:.7rem;color:var(--muted)}
.map-step-popup p{font-size:.78rem;line-height:1.35;margin:.45rem 0 0;max-height:4.2em;overflow:hidden}

/* Interactive trip timeline */
.timeline-shell{position:relative;max-width:980px;margin:0 auto;padding:1rem 0}
.timeline-shell:before{content:"";position:absolute;left:50%;top:1rem;bottom:1rem;width:3px;transform:translateX(-50%);background:linear-gradient(var(--brand),var(--brand2));border-radius:3px}
.timeline-item{position:relative;width:50%;padding:0 2rem 1.5rem}
.timeline-item:nth-child(odd){margin-left:0;text-align:right}
.timeline-item:nth-child(even){margin-left:50%}
.timeline-dot{position:absolute;top:1.2rem;width:18px;height:18px;border:4px solid #fff;border-radius:50%;background:var(--brand);box-shadow:0 0 0 3px rgba(18,113,91,.2)}
.timeline-item:nth-child(odd) .timeline-dot{right:-9px}.timeline-item:nth-child(even) .timeline-dot{left:-9px}
.timeline-card{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease;padding:1rem 1.1rem}
.timeline-card:hover,.timeline-card.is-active{transform:translateY(-2px);box-shadow:0 .8rem 2rem rgba(31,41,55,.14)}
.timeline-time{font-size:.72rem;font-weight:700;color:var(--brand);text-transform:uppercase;letter-spacing:.05em}
.timeline-title{font-size:1.05rem;margin:.2rem 0}.timeline-meta{font-size:.78rem;color:var(--muted)}
.timeline-description{font-size:.88rem;line-height:1.45;margin:.55rem 0 0}
.timeline-details{display:none;margin-top:.7rem;padding-top:.7rem;border-top:1px solid var(--line);font-size:.82rem}.timeline-card.is-active .timeline-details{display:block}
@media(max-width:768px){.timeline-shell:before{left:12px}.timeline-item,.timeline-item:nth-child(even){width:100%;margin-left:0;padding:0 0 1rem 2.2rem;text-align:left}.timeline-item:nth-child(odd) .timeline-dot,.timeline-item:nth-child(even) .timeline-dot{left:3px;right:auto}.map-step-popup{width:230px}}

/* Leaflet structural fallback: keeps tiles, markers and overlays positioned correctly
   even when the external Leaflet stylesheet is delayed or blocked. */
.leaflet-container{position:relative;overflow:hidden;outline-offset:1px;-webkit-tap-highlight-color:transparent}
.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}
.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none!important;max-height:none!important;width:256px;height:256px;padding:0}
.leaflet-tile-container{pointer-events:none}
.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}
.leaflet-control{position:relative;z-index:800;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}
.leaflet-control-container .leaflet-top.leaflet-left{margin:10px}.leaflet-control-zoom a{display:block;width:30px;height:30px;line-height:30px;text-align:center;background:#fff;color:#111;text-decoration:none;border-bottom:1px solid #ccc}.leaflet-control-zoom{border:1px solid #aaa;border-radius:4px;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.25)}
.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{position:relative}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;transform:rotate(45deg);background:#fff;box-shadow:2px 2px 5px rgba(0,0,0,.2)}
.leaflet-popup-close-button{position:absolute!important;top:4px!important;right:6px!important;z-index:5;color:#333!important;text-decoration:none!important;font-size:22px!important;line-height:20px!important}

.coordinate-picker-button {
  min-width: 245px;
}
.coordinate-picker-panel {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: .8rem;
  background: #f8fafc;
}
.coordinate-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}
.coordinate-picker-map {
  width: 100%;
  height: min(46vh, 420px);
  min-height: 300px;
  border-radius: .7rem;
  overflow: hidden;
  background: #dce8ec;
  border: 1px solid rgba(0,0,0,.08);
}
@media (max-width: 576px) {
  .coordinate-picker-toolbar { align-items: flex-start; flex-direction: column; }
  .coordinate-picker-toolbar .btn { width: 100%; }
  .coordinate-picker-map { height: 340px; min-height: 280px; }
  .coordinate-picker-button { width: 100%; min-width: 0; }
}
.coordinate-picker-panel[hidden]{display:none!important}
.coordinate-picker-panel:not([hidden]){display:block!important}
.coordinate-picker-map .coordinate-map-error{height:100%;display:grid;place-content:center;text-align:center;padding:2rem;color:#842029;background:#f8d7da}
.coordinate-picker-map .leaflet-container{height:100%;width:100%}

.step-image-dropzone{border:2px dashed #aab7c4;border-radius:12px;padding:1rem;text-align:center;cursor:pointer;background:#f8fafc;transition:.18s ease;display:flex;flex-direction:column;gap:.25rem}.step-image-dropzone:hover,.step-image-dropzone:focus,.step-image-dropzone.dragover{border-color:#0d6efd;background:#eef5ff;outline:none}.step-image-dropzone span{font-size:.84rem;color:#687786}.selected-image-files{display:flex;flex-wrap:wrap;gap:.4rem}.selected-image-file{display:inline-flex;align-items:center;border:1px solid #d8e0e8;border-radius:999px;background:#fff;padding:.3rem .65rem;font-size:.78rem}.existing-image-preview img{width:100%;height:90px;object-fit:cover;border-radius:8px}.image-copyright{font-size:.72rem;color:#687786;line-height:1.25;margin-top:.2rem}.image-url-row{background:#fbfcfd;border-color:#e4e9ee}
