@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--ink:#122a33;--muted:#81929b;--line:#e8edef;--bg:#f6f8f8;--teal:#0b665c;--mint:#c9eee1;--orange:#f8a86d;--navy:#0d2934;--white:#fff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:14px 'DM Sans',system-ui,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}h1,h2,h3,p{margin-top:0}h1,h2,h3{font-family:Manrope,'DM Sans',sans-serif;letter-spacing:-.045em}h2{font-size:27px}h3{font-size:17px}.hidden{display:none!important}.muted{color:var(--muted)}.small{font-size:12px}.center{text-align:center}.eyebrow{font-size:10px;letter-spacing:.17em;font-weight:800;color:#679288}.brand{font-family:Manrope,sans-serif;font-weight:800;font-size:25px;letter-spacing:-.08em;color:#fff}.brand.dark,.mobile-brand{color:var(--ink)}.brand-mark{background:#d4f6ac;color:#164c3c;display:inline-grid;place-items:center;width:33px;height:33px;border-radius:11px;margin-right:8px;font-size:22px;vertical-align:middle}.brand-dot{color:#7ccdae}.auth-layout{min-height:100vh;display:grid;grid-template-columns:1.07fr .93fr}.auth-left{background:#0d3038;position:relative;display:flex;flex-direction:column;justify-content:space-between;padding:52px 11%;overflow:hidden}.auth-left:before{content:'';position:absolute;width:660px;height:660px;right:-360px;top:10%;border:1px solid #2c555a;border-radius:50%;box-shadow:0 0 0 72px #153941,0 0 0 73px #28515a,0 0 0 150px #153941,0 0 0 151px #28515a;opacity:.45}.auth-copy{position:relative;max-width:600px}.pale{color:#b9ddc6}.auth-copy h1{color:#fff;font-size:clamp(43px,5vw,75px);line-height:1.13;margin:24px 0}.auth-copy em{color:#b7e3c3;font-style:normal}.auth-copy p{font-size:17px;color:#adc4c6;max-width:450px;line-height:1.8}.auth-points{margin-top:45px;color:#e1f0eb}.auth-points div{margin:15px 0}.auth-points div:first-letter{color:#93d9b4}.auth-points span{padding-left:12px}.auth-left-footer{color:#7eafb0;font-size:12px;position:relative}.auth-right{display:flex;align-items:center;justify-content:center;padding:55px;background:#fafbfb}.auth-panel{max-width:390px;width:100%}.auth-panel h2{font-size:38px;margin:12px 0}.auth-panel>p{margin-bottom:34px}.mobile-brand{display:none;font-weight:800;font-size:23px;margin-bottom:50px}.field-label{font-size:12px;font-weight:700;display:block;margin:18px 0 9px}input,textarea,select{border:1px solid #dce4e5;border-radius:12px;background:white;padding:13px 15px;color:var(--ink);outline:none;max-width:100%}input:focus,textarea:focus,select:focus{border-color:#159b80;box-shadow:0 0 0 3px #159b801e}.auth-panel input{width:100%}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:11px 16px;border:1px solid #dce5e4;background:white;color:var(--ink);border-radius:11px;font-weight:700;white-space:nowrap}.btn.primary{background:#0e6658;color:white;border-color:#0e6658}.btn.primary:hover{background:#084b41}.btn.wide{width:100%;margin-top:25px;justify-content:space-between;padding:15px}.btn.ghost{background:#f5f8f7}.btn.smallbtn{padding:8px 11px;font-size:12px}.demo-banner{background:#eff5ed;border:1px solid #e0ece4;border-radius:12px;padding:16px;color:#627b75;font-size:12px;line-height:1.7;margin:22px 0 14px}.app{display:flex;min-height:100vh}.sidebar{width:245px;flex-shrink:0;background:white;border-right:1px solid var(--line);padding:29px 19px;display:flex;flex-direction:column}.sidebar .brand{margin:4px 8px 60px}.sidebar-group{display:grid;gap:7px}.side-label{color:#a2b1b6;font-size:10px;letter-spacing:.13em;font-weight:800;margin:0 12px 16px}.nav{width:100%;border:0;background:transparent;color:#7e8d94;text-align:left;padding:14px 15px;border-radius:11px;font-weight:700}.nav span{font-size:20px;vertical-align:middle;margin-right:13px}.nav.active,.nav:hover{background:#e9f5ef;color:#126652}.sidebar-bottom{margin-top:auto}.side-hint{font-size:10px;letter-spacing:.15em;color:#91a7a5;font-weight:800}.sidebar-bottom>p{color:#7a9393;font-size:13px;line-height:1.7}.link-btn{background:none;border:none;color:#0e6658;font-size:12px;font-weight:700;padding:8px 0}.profile{display:flex;gap:9px;align-items:center;border-top:1px solid var(--line);margin-top:17px;padding-top:19px}.avatar{height:37px;width:37px;border-radius:50%;display:grid;place-items:center;background:#cde6d8;color:#165e4d;font-weight:800}.profile strong{font-size:12px}.profile small{display:block;color:#9aaaad;font-size:10px;margin-top:3px}.profile button{margin-left:auto;border:0;background:transparent;font-size:21px;color:#94a3a8}.main-area{flex:1;min-width:0}.topbar{height:115px;background:#fff;border-bottom:1px solid var(--line);padding:25px clamp(20px,4vw,65px);display:flex;align-items:center;justify-content:space-between;gap:15px}.topbar-title>span{font-size:10px;color:#9aa9ad;letter-spacing:.12em;font-weight:800}.topbar h2{font-size:25px;margin:5px 0}.top-actions{display:flex;align-items:center;gap:13px}.local-chip{font-size:11px;color:#81958e;background:#eef6f1;border-radius:30px;padding:9px 12px}.content{padding:35px clamp(20px,4vw,65px) 90px;max-width:1500px;margin:auto}.welcome{display:flex;justify-content:space-between;align-items:end;margin-bottom:25px;gap:20px}.welcome h2{margin:0 0 9px;font-size:27px}.welcome p{color:var(--muted);margin:0}.card{background:#fff;border:1px solid #e8eded;border-radius:19px;padding:24px;box-shadow:0 7px 28px #102b3010}.grid-main{display:grid;grid-template-columns:minmax(340px,1.13fr) minmax(310px,.87fr);gap:22px}.card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:23px}.card-header h3{margin:0}.calendar-nav{display:flex;align-items:center;gap:12px}.icon-btn{background:transparent;border:0;border-radius:8px;padding:7px 10px;color:#687d83;font-size:17px}.icon-btn:hover{background:#f3f5f6}.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}.dow{text-align:center;color:#9bacb0;font-size:11px;font-weight:800;padding-bottom:10px}.date-cell{aspect-ratio:1;min-height:45px;border:1px solid transparent;background:transparent;border-radius:12px;color:#536971;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1px;font-size:13px}.date-cell:hover{background:#eff5f2}.date-cell.has-trip{background:#e3f2ea;color:#0c6556;font-weight:800}.date-cell.selected{background:#0c6658!important;color:#fff!important}.date-cell .dot{width:5px;height:5px;background:#1aaa8e;border-radius:50%}.date-cell.selected .dot{background:#fff}.date-cell.empty{visibility:hidden}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.section-title h3{margin:0}.trip-list{display:grid;gap:12px}.trip-item{display:flex;justify-content:space-between;gap:12px;align-items:center;border:1px solid #ecf0ef;background:#fff;border-radius:14px;padding:15px;cursor:pointer}.trip-item:hover{border-color:#86c9ad;transform:translateY(-1px)}.trip-icon{background:#e6f4ed;color:#116c58;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;font-size:20px;flex-shrink:0}.trip-title{font-weight:800;font-size:13px}.trip-meta{color:#91a0a4;font-size:11px;margin-top:4px}.badge{border-radius:7px;padding:5px 8px;background:#e8f3ec;color:#298267;font-size:10px;font-weight:800;white-space:nowrap}.badge.planned{background:#fff1dc;color:#ae7733}.badge.complete{background:#ebf0f2;color:#5e7c87}.upcoming-hero{background:#133b42;color:white;border-radius:18px;padding:25px;margin-bottom:22px;position:relative;overflow:hidden}.upcoming-hero:after{content:'✈';position:absolute;font-size:130px;color:#ffffff0f;right:10px;top:-55px;transform:rotate(-20deg)}.upcoming-hero .eyebrow{color:#a4d6c2}.upcoming-hero h3{font-size:25px;margin:12px 0}.upcoming-hero p{color:#b9d0d0;font-size:12px;line-height:1.6}.upcoming-hero .btn{position:relative;z-index:2}.detail-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:23px;gap:15px}.back{border:0;background:none;color:#0c6658;font-weight:700;padding:0 0 16px}.detail-title{font-size:29px;margin:0 0 8px}.detail-sub{color:#93a2a8}.detail-layout{display:grid;grid-template-columns:minmax(340px,1.2fr) minmax(300px,.8fr);gap:22px}.leg{display:grid;grid-template-columns:64px 3px 1fr;gap:14px;min-height:102px}.leg-time{font-weight:800;color:#315c59;font-size:12px;padding-top:15px}.rail{background:#dcece5;position:relative}.rail:before{content:'';position:absolute;background:#0a775d;border:4px solid #ecf7ef;width:11px;height:11px;border-radius:50%;top:15px;left:50%;transform:translateX(-50%)}.leg-box{padding:13px 17px;margin-bottom:12px;border:1px solid #e9eeed;border-radius:12px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;gap:15px}.leg-box:hover,.leg-box.on{border-color:#83cbb4;background:#f2faf5}.leg-box strong{display:block;font-size:13px}.leg-box small{display:block;color:#9aabad;margin-top:4px}.leg-icon{font-size:22px;color:#19725a}.tab-strip{display:flex;gap:6px;background:#f0f4f3;padding:5px;border-radius:11px;margin-bottom:20px}.tab{flex:1;border:0;background:transparent;padding:10px 7px;border-radius:8px;color:#859795;font-size:12px;font-weight:800}.tab.active{background:white;color:#116d5a;box-shadow:0 3px 6px #0a363012}.doc-row,.task-row{display:flex;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #edf1ef}.doc-icon{width:35px;height:35px;border-radius:9px;background:#edf6f0;color:#0d775c;display:grid;place-items:center;font-size:17px}.doc-row strong{font-size:12px}.doc-row small{display:block;font-size:10px;color:#a2adaf;margin-top:4px}.doc-row .icon-btn{margin-left:auto}.task-row label{flex:1}.task-row input{accent-color:#0b8163}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.input-wrap{display:grid;gap:7px;margin-bottom:16px}.input-wrap label{font-size:12px;font-weight:800;color:#5c7377}.input-wrap input,.input-wrap textarea,.input-wrap select{width:100%}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.empty-state{padding:30px;text-align:center;color:#8a9e9d;border:1px dashed #dce6e2;border-radius:12px}.empty-state .big{font-size:30px;margin-bottom:8px}.empty-state strong{display:block;color:#395959;margin-bottom:7px}.helper{color:#95a7aa;font-size:11px;line-height:1.6;margin:12px 0}.actions-row{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}.subheading{font-size:12px;font-weight:800;color:#6a8988;margin:20px 0 12px;text-transform:uppercase;letter-spacing:.08em}.modal-overlay{position:fixed;inset:0;z-index:20;background:#09232ab3;display:flex;align-items:center;justify-content:center;padding:15px}.modal{background:white;width:min(540px,100%);max-height:88vh;overflow:auto;border-radius:20px;padding:28px;box-shadow:0 20px 70px #0003}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.modal-head h2{margin:0}.toast{position:fixed;right:25px;bottom:25px;background:#113e39;color:white;padding:13px 18px;border-radius:12px;box-shadow:0 8px 30px #0002;z-index:50}.mobile-nav{display:none}.pill-note{display:inline-block;background:#f3f7f5;color:#657f7c;padding:8px 11px;border-radius:9px;font-size:12px;margin:4px 0}.wallet-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:13px}.wallet-card{border:1px solid #e7edeb;border-radius:13px;padding:16px;background:#fff}.wallet-card strong{display:block;margin-bottom:7px}.wallet-card small{color:#8ca09d}.quick-note{background:#eaf5ef;border-radius:15px;padding:17px;color:#316658;font-size:12px;line-height:1.7}.progress-bar{height:7px;background:#e7eee9;border-radius:10px;overflow:hidden;margin:12px 0}.progress-fill{background:#1a9c7d;height:100%;border-radius:10px}.mobile-nav{border:0;background:none;font-size:21px}
@media(max-width:1050px){.sidebar{width:205px}.grid-main,.detail-layout{grid-template-columns:1fr}.content{padding:25px}.topbar{padding:20px 25px}}@media(max-width:700px){.auth-layout{display:block}.auth-left{display:none}.auth-right{min-height:100vh;padding:40px 25px}.mobile-brand{display:block}.sidebar{position:fixed;z-index:14;top:0;left:-270px;height:100vh;width:245px;box-shadow:5px 0 40px #0001;transition:left .2s}.sidebar.open{left:0}.mobile-nav{display:block}.topbar{height:90px;padding:16px}.topbar h2{font-size:20px}.local-chip{display:none}.top-actions .btn{padding:10px;font-size:12px}.content{padding:21px 15px 70px}.welcome h2{font-size:23px}.card{padding:17px}.calendar-grid{gap:3px}.date-cell{min-height:35px}.detail-head{display:block}.detail-head .btn{margin-top:15px}.detail-title{font-size:25px}.field-row{grid-template-columns:1fr}.leg{grid-template-columns:45px 3px 1fr;gap:10px}.leg-box{padding:12px}.modal{padding:20px}}
/* V1.1: explicit edit and rescheduling controls */
.doc-row{flex-wrap:wrap}.doc-row>div[style]{min-width:180px!important;flex-basis:45%}.doc-row .btn{white-space:normal}.btn.danger{color:#b0443b;border-color:#f0d3d0}.badge.travel-delayed,.badge.travel-cancelled{background:#fff0e3;color:#a55422}.badge.travel-rescheduled{background:#e5efff;color:#355ea7}.status-text{text-transform:capitalize;color:#b56b33!important;font-weight:700}
.auth-tabs{display:flex;gap:8px;margin:22px 0 12px}.auth-tabs button{flex:1;border:1px solid #bfd2d3;background:transparent;border-radius:12px;padding:10px;cursor:pointer;color:#183943;font-weight:700}.auth-tabs button:focus{outline:2px solid #198a75}#auth-form input{width:100%;margin-bottom:12px}#forgot{margin-top:10px}.danger{color:#b44840!important}
/* Calendar navigation: accessible today marker and jump control */
.today-btn{border:1px solid #cdded6;background:#f2faf5;color:#0b6657;border-radius:9px;padding:7px 12px;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.today-btn:hover{background:#dff2e7;border-color:#8acdb6}
.today-btn:focus-visible,.date-cell:focus-visible{outline:3px solid #0e7564;outline-offset:2px}
.date-cell.is-today{border:2px solid #0b705f;box-shadow:inset 0 0 0 1px #fff;color:#075d50;font-weight:900}
.date-cell.is-today.has-trip{background:#d4f2e2}
.date-cell.is-today::after{content:"";position:absolute;bottom:3px;width:4px;height:4px;border-radius:50%;background:#0b705f}
.date-cell{position:relative}

/* Document wallet — group files by trip and journey step */
.wallet-trip-group{margin-top:22px;border:1px solid #e0e9e6;border-radius:16px;overflow:hidden;background:#fff}
.wallet-trip-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 22px;background:#f0f7f4;border-bottom:1px solid #e0e9e6}
.wallet-trip-header h3{font-size:20px;margin:5px 0}
.wallet-trip-header p{margin:0}
.wallet-step-group{padding:20px 22px;border-top:1px solid #eaf0ee}
.wallet-step-group:first-of-type{border-top:0}
.wallet-step-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.wallet-step-header strong{font-size:15px}
.wallet-step-header .muted{margin-top:5px}
.wallet-step-group .wallet-grid{margin-top:10px}
@media(max-width:620px){.wallet-trip-header,.wallet-step-header{align-items:flex-start;flex-direction:column}.wallet-trip-header,.wallet-step-group{padding:15px}.wallet-trip-header h3{font-size:18px}}

/* Outbound / Return journey organisation */
.journey-section{margin:14px 0 23px;padding:12px 0 2px;border-top:1px solid #e4ece8}
.journey-section-header{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 15px;padding:10px 2px 8px}
.journey-section-header h4{font-size:17px;color:#143b37;margin:4px 0 5px}
.journey-section-kicker{font-size:10px;font-weight:800;letter-spacing:.13em;color:#488c79}
.journey-section-header .btn{white-space:nowrap}
.journey-empty{padding:16px;border:1px dashed #d8e7e0;border-radius:12px;color:#7a9190;font-size:12px;line-height:1.5;margin:0 0 18px}
.journey-return .journey-section-header{background:#f4f8f5;border-radius:12px;padding:13px}
.wallet-journey-header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 22px;color:#146552;background:#f6faf8;border-top:1px solid #e2ebe6}
.wallet-journey-header strong{font-size:14px}
.wallet-journey-header span{font-size:11px;color:#7a9290}
@media(max-width:620px){.journey-section-header{align-items:flex-start}.journey-section-header h4{font-size:15px}.wallet-journey-header{padding:12px 15px}}

/* Calendar hover and keyboard-focus preview for saved trip names */
.date-cell[data-trip-tooltip]{position:relative}
.date-cell[data-trip-tooltip]::before{
  content:attr(data-trip-tooltip);
  position:absolute;left:50%;bottom:calc(100% + 9px);transform:translateX(-50%);
  width:max-content;max-width:min(250px,75vw);white-space:normal;overflow-wrap:anywhere;
  background:#123c37;color:#fff;border-radius:9px;padding:9px 12px;
  font-size:12px;font-weight:700;line-height:1.4;text-align:center;
  box-shadow:0 9px 25px #123c372b;
  opacity:0;visibility:hidden;pointer-events:none;z-index:30;transition:opacity .12s ease;
}
.date-cell[data-trip-tooltip]:hover,.date-cell[data-trip-tooltip]:focus-visible{z-index:35}
.date-cell[data-trip-tooltip]:hover::before,.date-cell[data-trip-tooltip]:focus-visible::before{opacity:1;visibility:visible}

/* Readable stacked title and metadata in Overview trip cards */
.trip-item{width:100%;text-align:left}
.trip-copy{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:5px;text-align:left}
.trip-item .trip-title{display:block;max-width:100%;font-weight:800;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.trip-item .trip-meta{display:block;max-width:100%;margin-top:0;color:#879aa0;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.trip-item>.badge{margin-left:auto;flex-shrink:0}
@media(max-width:520px){.trip-item{gap:10px;flex-wrap:wrap}.trip-item>.badge{margin-left:0}.trip-item .trip-title{font-size:13px}}

/* Mobile-first refinements: preserve the desktop layout above 700px. */
@media(max-width:700px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .app,.main-area,.content{width:100%;max-width:100%;min-width:0}
  .topbar{height:auto;min-height:92px;padding:14px 16px;gap:10px;display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center}
  .mobile-nav{display:grid;place-items:center;width:40px;height:44px;border-radius:10px;color:#0b665c;font-size:24px}
  .mobile-nav:focus-visible{outline:2px solid #0b665c;outline-offset:2px}
  .topbar-title{min-width:0}
  .topbar-title>span{font-size:9px;letter-spacing:.09em}
  .topbar h2{font-size:clamp(17px,4.5vw,21px);line-height:1.2;overflow-wrap:anywhere;margin-top:5px}
  .top-actions{gap:0}
  .top-actions .btn{padding:11px 12px;min-height:42px;font-size:12px;white-space:nowrap}
  .content{padding:22px 14px 64px}
  .welcome{margin-bottom:18px}
  .welcome h2{font-size:clamp(21px,5.6vw,26px);line-height:1.25}
  .welcome p{font-size:13px;line-height:1.6}
  .grid-main,.detail-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:16px}
  .grid-main>div{min-width:0}
  .card{padding:16px;border-radius:18px}
  .card-header{margin-bottom:14px;gap:9px}
  .card-header h3{font-size:clamp(15px,4vw,18px)}
  .calendar-nav{gap:3px;flex-shrink:0}
  .calendar-nav .icon-btn{min-width:33px;min-height:39px;font-size:22px;padding:5px 7px}
  .today-btn{min-height:37px;padding:7px 10px;font-size:12px}
  .calendar-grid{gap:3px}
  .calendar-grid .dow{font-size:10px;padding:2px 0 8px}
  .calendar-grid .date-cell{min-height:0;height:clamp(37px,10vw,48px);aspect-ratio:auto;border-radius:9px;padding:2px;font-size:12px;gap:1px}
  .date-cell .dot{width:4px;height:4px}
  .date-cell.is-today::after{width:3px;height:3px;bottom:2px}
  .helper{font-size:11px;line-height:1.45}
  .upcoming-hero{padding:21px;border-radius:18px;margin-bottom:16px}
  .upcoming-hero h3{font-size:clamp(21px,6vw,28px);line-height:1.3;overflow-wrap:anywhere}
  .upcoming-hero p{font-size:12px;line-height:1.5}
  .upcoming-hero .btn{min-height:44px}
  .trip-item{display:grid;grid-template-columns:42px minmax(0,1fr);column-gap:12px;row-gap:9px;align-items:center;padding:14px}
  .trip-item .trip-copy{min-width:0;align-items:flex-start;gap:5px}
  .trip-item .trip-title{font-size:14px;line-height:1.3;color:var(--ink)}
  .trip-item .trip-meta{font-size:11px;line-height:1.5}
  .trip-item>.badge{grid-column:2;justify-self:start;margin:0}
  .detail-head .actions-row{display:flex;gap:7px;flex-wrap:wrap}
  .detail-head .btn{margin-top:8px}
  .leg{grid-template-columns:40px 3px minmax(0,1fr);gap:8px;min-height:85px}
  .leg-time{font-size:10px}
  .leg-box{min-width:0;padding:11px 9px;gap:7px}
  .leg-box strong{font-size:12px;overflow-wrap:anywhere}
  .leg-box small{font-size:10px;overflow-wrap:anywhere}
  .leg-icon{font-size:18px;flex-shrink:0}
  .journey-section-header{gap:8px}
  .journey-section-header .btn{padding:8px;font-size:11px}
  .tab-strip{gap:2px}
  .tab{padding:10px 3px;font-size:11px}
  .doc-row{align-items:flex-start}
  .doc-row>div[style]{flex-basis:calc(100% - 50px);min-width:0!important}
  .wallet-grid{grid-template-columns:minmax(0,1fr)}
  .wallet-trip-header,.wallet-step-group{min-width:0}
  .wallet-card{min-width:0}
  .modal{max-height:calc(100dvh - 32px)}
  .toast{left:14px;right:14px;bottom:18px;text-align:center}
}
@media(max-width:360px){
  .topbar{grid-template-columns:34px minmax(0,1fr);gap:8px}
  .top-actions{grid-column:2;justify-self:start}
  .topbar h2{font-size:17px}
  .calendar-nav .icon-btn{min-width:27px}
  .today-btn{padding:6px 8px}
}
@media(hover:none){
  .date-cell[data-trip-tooltip]:hover::before{opacity:0;visibility:hidden}
  .date-cell[data-trip-tooltip]:focus-visible::before{opacity:1;visibility:visible}
}

/* Mobile Overview: the Your Trips list replaces the redundant Next Adventure card. */
@media(max-width:700px){.upcoming-hero{display:none}}

/* Finished journey steps / arrived flights */
.badge.travel-completed,.badge.travel-landed{background:#e2f4e9;color:#166c51}
.status-text{display:inline-block}
.leg-box .status-text{color:#397e69!important}
.leg-box .status-text:not(:empty){font-size:11px}

/* Manual trip archive in Overview; completed trips stay editable and retain their files. */
.trip-archive{margin-top:20px;border-top:1px solid #e3ebe8;padding-top:17px}
.trip-archive>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;padding:6px 0;color:#173b36}
.trip-archive>summary::-webkit-details-marker{display:none}
.trip-archive>summary:focus-visible{outline:2px solid #0b665c;outline-offset:3px;border-radius:5px}
.archive-heading{font-size:15px;font-weight:800;display:flex;align-items:center;gap:9px}
.archive-heading>span{color:#34846d;font-size:19px}
.archive-summary-end{display:flex;align-items:center;gap:12px}
.archive-chevron{font-size:20px;display:inline-block;transition:transform .2s}
.trip-archive[open] .archive-chevron{transform:rotate(180deg)}
.archive-list{margin-top:16px}
.archive-empty{padding:15px 12px;font-size:12px;color:#81929b;line-height:1.6;background:#f6f9f7;border-radius:11px}
@media(max-width:700px){.trip-archive{margin-top:18px;padding-top:14px}.archive-heading{font-size:14px}.trip-archive>summary{min-height:44px}}

/* Sign-in flow: fields first, then two equal primary actions. */
.auth-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}
.auth-actions .btn{min-width:0;min-height:48px;padding:12px 10px;font-size:13px;white-space:normal;text-align:center}
.auth-actions #tab-signup{background:#fff;color:#0e6658;border-color:#9ac9bd}
.auth-actions #tab-signup:hover{background:#eef8f3}
.auth-actions #auth-submit:only-child{grid-column:1/-1}
#forgot{margin-top:14px}
#tab-login{display:inline-block;margin-left:12px}
@media(max-width:700px){.auth-panel>p{margin-bottom:24px}.auth-actions{gap:10px;margin-top:20px}.auth-actions .btn{min-height:48px;font-size:13px}.auth-panel .field-label{margin-top:16px}}
@media(max-width:360px){.auth-actions{gap:8px}.auth-actions .btn{font-size:12px;padding:11px 7px}}

/* Calendar: grey Saturday/Sunday columns and dark-red England & Wales bank holidays. */
.calendar-grid>.dow:nth-child(7n+6),.calendar-grid>.dow:nth-child(7n+7){
  background:#eef0f1;color:#647178;border-radius:8px;padding-top:7px;
}
.calendar-grid>.date-cell:nth-child(7n+6),.calendar-grid>.date-cell:nth-child(7n+7){
  background:#eef0f1;color:#647178;
}
.calendar-grid>.date-cell.empty:nth-child(7n+6),.calendar-grid>.date-cell.empty:nth-child(7n+7){
  visibility:visible;pointer-events:none;opacity:.55;
}
/* Existing trip highlighting remains green on weekends. */
.calendar-grid>.date-cell.has-trip{background:#e3f2ea;color:#0c6556}
.calendar-grid>.date-cell.is-today{border-color:#0b705f}
.calendar-grid>.date-cell.is-bank-holiday{
  background:#f6e4e5;color:#871d2c;font-weight:900;border-color:#cf8791;
}
.calendar-grid>.date-cell.is-bank-holiday.has-trip{
  background:#e3f2ea;color:#871d2c;border:2px solid #9f2736;
}
.date-cell .holiday-mark{
  position:absolute;top:4px;right:5px;width:6px;height:6px;
  border-radius:50%;background:#8f1b2b;box-shadow:0 0 0 1px #fff8;
}
.calendar-grid>.date-cell.is-bank-holiday:hover{filter:brightness(.96)}
.calendar-legend{display:flex;align-items:center;flex-wrap:wrap;gap:9px 15px;font-size:11px}
.legend-item{display:inline-flex;align-items:center;gap:6px}
.legend-dot{width:10px;height:10px;display:inline-block;border-radius:3px;flex-shrink:0}
.legend-dot.trip-dot{background:#c5e8d5}
.legend-dot.bank-dot{background:#8f1b2b}
.legend-dot.weekend-dot{background:#dfe3e5}
@media(max-width:700px){
  .date-cell .holiday-mark{width:5px;height:5px;right:3px;top:3px}
  .calendar-legend{font-size:10px;gap:7px 12px}
}

/* Unified travel checklist: uses the same tasks as each journey step. */
.checklist-dashboard{margin-bottom:18px}
.checklist-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:19px}
.checklist-summary>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border-radius:12px;padding:16px 7px;background:#f3f8f6}
.checklist-summary strong{font:800 25px Manrope,'DM Sans',sans-serif;color:#146c59}
.checklist-summary span{font-size:11px;color:#718985}
.checklist-filters{display:flex;gap:8px;flex-wrap:wrap}
.checklist-trip{background:white;border:1px solid #e3ece8;border-radius:18px;padding:22px;margin-bottom:18px}
.checklist-trip-header{display:flex;justify-content:space-between;align-items:center;gap:15px;padding-bottom:13px;border-bottom:1px solid #e7eeeb}
.checklist-trip-header h3{margin:0 0 5px;font-size:18px}
.checklist-trip-header p{margin:0}
.checklist-journey{padding-top:16px}
.checklist-journey h4{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#438672;margin:4px 0 12px}
.checklist-step{border:1px solid #ebf0ed;border-radius:13px;padding:14px;margin:0 0 11px}
.checklist-step-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.checklist-step-header>div{min-width:0}
.checklist-step-header strong{font-size:13px;overflow-wrap:anywhere}
.checklist-step-header .muted{margin-top:5px;margin-left:27px}
.checklist-step-icon{display:inline-block;width:24px;font-size:19px;vertical-align:middle}
.checklist-task{display:flex;gap:11px;align-items:center;min-height:48px;padding:11px 6px;border-top:1px solid #edf1ef;cursor:pointer;line-height:1.5;overflow-wrap:anywhere}
.checklist-task input{accent-color:#0b8163;flex:0 0 auto;width:19px;height:19px;margin:0;padding:0;align-self:center}
.checklist-task span{flex:1;min-width:0}
.checklist-task.is-complete span{text-decoration:line-through;color:#8a9c99}
.checklist-empty{text-align:center;padding:32px 16px}
.checklist-empty strong{display:block;margin-bottom:10px}
@media(max-width:700px){
  .checklist-trip{padding:15px;border-radius:16px}
  .checklist-summary>div{padding:13px 5px}
  .checklist-summary strong{font-size:22px}
  .checklist-trip-header{align-items:flex-start;gap:8px}
  .checklist-trip-header h3{font-size:15px}
  .checklist-trip-header .btn{padding:8px;font-size:11px}
  .checklist-step{padding:11px}
  .checklist-step-header .btn{padding:8px;font-size:11px;white-space:nowrap}
}

/* Trip-level to-dos, separate from journey step checklists */
.checklist-general{padding:17px 0 8px;border-bottom:1px solid #e8efeb}
.checklist-general-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.checklist-general-title h4{font-size:14px;color:#176552;margin:0 0 3px}
.checklist-general-row{display:flex;align-items:center;gap:5px;border-top:1px solid #edf1ef}
.checklist-general-row .checklist-task{flex:1;min-width:0;border-top:0}
.checklist-delete{min-height:40px;min-width:40px;font-size:21px;flex-shrink:0}
.checklist-add-form{display:flex;gap:9px;align-items:center;margin:12px 0 10px}
.checklist-add-form input{min-width:0;flex:1;font-size:13px}
.checklist-add-form .btn{min-height:44px}
.checklist-no-tasks{margin:0 0 12px}
@media(max-width:700px){
 .checklist-general{padding-top:14px}
 .checklist-add-form{gap:6px}
 .checklist-add-form input{padding:11px 9px;font-size:12px}
 .checklist-add-form .btn{font-size:11px;padding:9px;white-space:nowrap}
}

/* Clearer contrast between trip / journey headers and white document cards */
.wallet-trip-header{background:#dcece5;border-bottom:2px solid #a6cbbd}
.wallet-trip-header .eyebrow{color:#326d61}
.wallet-trip-header h3{color:#153f37}
.wallet-trip-header .muted{color:#557970}
.wallet-journey-header{background:#d3e6dd;color:#125846;border-top:2px solid #abcdbd;border-bottom:1px solid #b8d5c8}
.wallet-journey-header span{color:#436d61}
.wallet-step-group{background:#fff}

/* Consistent sage hierarchy across Calendar, trip details, checklists and documents.
   Darker tint is reserved for section/group headers; content remains white. */
:root{
  --section-sage:#dcece5;
  --subsection-sage:#e5f0eb;
  --sage-outline:#aacbbd;
  --sage-ink:#174e43;
  --secondary-ink:#56766e;
}
/* Overview: make grouped trips visually distinct from white calendar/content */
.grid-main .section-title{background:var(--section-sage);border:1px solid var(--sage-outline);border-radius:11px;padding:12px 14px;margin-bottom:14px}
.grid-main .section-title h3{color:var(--sage-ink)}
.grid-main .section-title .muted{color:var(--secondary-ink)}
.trip-item{border-color:#d4e4dc;background:#f8fbf9}
.trip-item:hover,.trip-item:focus-visible{background:#eff7f2;border-color:#7fb39d}
.trip-item .trip-meta{color:#57756e}
.trip-icon{background:#d5ebe0}
.trip-archive{border-top-color:#bcd7ca}
.trip-archive>summary{background:var(--subsection-sage);border:1px solid #c5dccf;border-radius:10px;padding:11px 13px}
.trip-archive[open]>summary{background:var(--section-sage);border-color:var(--sage-outline)}
/* Journey timeline: distinguish journey headers, selected leg and details */
.journey-section-header{background:var(--subsection-sage);border:1px solid #d0e2d7;border-radius:12px;padding:13px}
.journey-section-header h4{color:var(--sage-ink)}
.journey-section-kicker{color:#397563}
.journey-return .journey-section-header{background:var(--section-sage);border-color:var(--sage-outline)}
.leg-box{background:#fff;border-color:#dce8e1}
.leg-box.on{background:#dcece5;border-color:#7da995}
.leg-box:hover{background:#ecf6ef}
.leg-box small{color:#58746e}
.leg-time .muted,.detail-sub{color:#617d77}
.detail-layout .card>.card-header{background:var(--subsection-sage);border:1px solid #d0e2d7;border-radius:11px;padding:12px 14px}
.detail-layout .card>.card-header h3{color:var(--sage-ink)}
.tab-strip{background:#dcece5}
.tab{color:#486c61}
.tab.active{background:#fff;color:#105f4e}
/* Checklist: trip header and summary clearly delineated from tasks */
.checklist-trip{border-color:#c8dfd2}
.checklist-trip-header{background:var(--section-sage);border:1px solid var(--sage-outline);border-radius:11px;padding:13px 14px;margin-bottom:4px}
.checklist-trip-header h3{color:var(--sage-ink)}
.checklist-trip-header .muted{color:var(--secondary-ink)}
.checklist-general-title{background:var(--subsection-sage);border:1px solid #cfe2d6;border-radius:10px;padding:12px 13px}
.checklist-general-title h4{color:var(--sage-ink)}
.checklist-summary>div{background:var(--subsection-sage);border:1px solid #cfdfd6}
.checklist-summary span{color:var(--secondary-ink)}
.checklist-task{color:#243d39}
.checklist-task.is-complete span{color:#6e8580}
/* Common secondary text, without losing the emphasis of primary headings. */
.wallet-step-header .muted,.wallet-card small{color:#5d7c74}
.wallet-step-group{border-top-color:#cbded3}
.wallet-card{border-color:#d3e3da}
.quick-note{background:var(--subsection-sage);color:#245d4c}
.empty-state{border-color:#c4d8cd;color:#607b73}
.empty-state strong{color:var(--sage-ink)}
@media(max-width:700px){
  .grid-main .section-title,.checklist-trip-header{padding:11px 12px}
  .journey-section-header{padding:11px}
  .detail-layout .card>.card-header{padding:10px 12px}
  .trip-archive>summary{padding:10px 12px}
}
