/* /trip/assets/app.css */
/* TripLog UI v2 — WOW Dashboard theme (Desktop + Mobile) */

:root{
  --bg:#f6f7fb;
  --text:#0f172a;
  --muted:#64748b;
  --border:rgba(15,23,42,.10);

  --card:#ffffff;
  --shadow:0 18px 50px rgba(15,23,42,.08);

  --primary:#ff385c;       /* Airbnb-ish accent */
  --primaryText:#ffffff;

  --success:#22c55e;
  --danger:#ef4444;
  --warning:#f59e0b;

  --radius:18px;
  --radius2:24px;

  --heroGrad1:#0ea5a5;
  --heroGrad2:#2563eb;
  --heroGrad3:#ff385c;

  --maxw:1160px;
}

/* -------------------- Base -------------------- */
*{box-sizing:border-box;}
html,body{margin:0;padding:0;background:var(--bg);color:var(--text);}
body{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  font-size:14px;
  line-height:1.45;
}

a{color:inherit;text-decoration:none;}
a:hover{opacity:.92}

.wrap{max-width:var(--maxw);margin:0 auto;padding:0 16px;}
.main{padding:18px 0 46px;}

/* Headings */
.muted{color:var(--muted);}
.h1{
  font-size:24px;
  letter-spacing:-0.03em;
  font-weight:800;
  margin:0;
}
.sub{margin-top:6px;color:var(--muted);font-size:14px;}

/* -------------------- Cards -------------------- */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
}

.card--soft{
  background:rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
}

.card--flat{
  box-shadow:none;
}

/* -------------------- Forms -------------------- */
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
@media(max-width:820px){.grid2{grid-template-columns:1fr;}}

.label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:10px 0 6px;
  font-weight:600;
}

.input, select, textarea{
  width:100%;
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 12px;
  font-size:14px;
  outline:none;
  background:#fff;
}

.input:focus, select:focus, textarea:focus{
  border-color:rgba(255,56,92,.55);
  box-shadow:0 0 0 4px rgba(255,56,92,.12);
}

textarea{resize:vertical;}

/* -------------------- Buttons -------------------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 14px;
  border-radius:14px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  font-weight:650;
  cursor:pointer;
  user-select:none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover{
  background:rgba(15,23,42,.03);
  color:var(--text);
  transform: translateY(-1px);
}
.btn:active{transform: translateY(0);}

.btn--primary{
  background:linear-gradient(135deg, var(--primary), #ff6b81);
  border-color:rgba(0,0,0,0);
  color:var(--primaryText);
  box-shadow:0 16px 40px rgba(255,56,92,.25);
}
.btn--primary:hover{
  background:linear-gradient(135deg, #e63151, #ff4f6d);
  color:var(--primaryText);
}

.btn--danger{
  background:rgba(239,68,68,.10);
  border-color:rgba(239,68,68,.20);
  color:#991b1b;
}
.btn--danger:hover{
  background:rgba(239,68,68,.14);
}

.btn--ghost{background:#fff;}
.btnrow{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px;}

/* -------------------- Flash -------------------- */
.flash{
  border-radius:16px;
  padding:12px 14px;
  border:1px solid var(--border);
  margin-bottom:12px;
  font-weight:650;
}
.flash--success{background:rgba(34,197,94,.10); border-color:rgba(34,197,94,.25);}
.flash--error{background:rgba(239,68,68,.10); border-color:rgba(239,68,68,.25);}

/* -------------------- Topbar -------------------- */
.topbar{
  position:sticky; top:0; z-index:50;
  background:rgba(255,255,255,.75);
  backdrop-filter: blur(14px);
  border-bottom:1px solid rgba(15,23,42,.08);
}

.topbar__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 16px;
}

.brand{display:flex;align-items:center;gap:10px;}
.brand__dot{
  width:10px;height:10px;border-radius:999px;
  background:linear-gradient(135deg, var(--primary), #ff9db0);
  box-shadow:0 8px 18px rgba(255,56,92,.35);
}
.brand__text{
  font-weight:900;
  letter-spacing:-0.02em;
}

.nav{display:flex;gap:12px;align-items:center;}
.nav__link{
  color:var(--text);
  padding:9px 12px;
  border-radius:14px;
  font-weight:700;
  opacity:.88;
}
.nav__link:hover{
  background:rgba(15,23,42,.05);
  opacity:1;
}

.topbar__actions{display:flex;gap:10px;align-items:center;}

.iconbtn{
  display:none;
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px;
  padding:8px 10px;
  font-size:16px;
}

.nav--mobile{
  border-top:1px solid rgba(15,23,42,.08);
  background:rgba(255,255,255,.9);
}
.nav__mobileInner{display:grid;gap:6px;padding:10px 16px;}
.nav__divider{height:1px;background:var(--border); margin:6px 0;}

@media(max-width:860px){
  .nav--desktop{display:none;}
  .iconbtn{display:inline-flex;}
}

/* -------------------- Footer -------------------- */
.footer{
  border-top:1px solid rgba(15,23,42,.08);
  padding:18px 0;
  background:rgba(255,255,255,.75);
  backdrop-filter: blur(12px);
}
.footer__inner{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

/* -------------------- Pills -------------------- */
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:12px;
  color:var(--text);
  font-weight:700;
}

.pill--money{font-weight:900;}

/* ============================================================
   NEW: WOW Dashboard / Hero / Tiles / Stats
   (does not break old pages — only adds new classes)
   ============================================================ */

.hero{
  border-radius:var(--radius2);
  overflow:hidden;
  position:relative;
  box-shadow:0 28px 70px rgba(15,23,42,.16);
  border:1px solid rgba(255,255,255,.25);
}

.hero__bg{
  min-height:240px;
  background:
    linear-gradient(135deg, rgba(14,165,165,.92), rgba(37,99,235,.82), rgba(255,56,92,.70)),
    url('/trip/assets/hero.jpg');
  background-size:cover;
  background-position:center;
  padding:22px;
  display:flex;
  align-items:flex-end;
}

.hero__content{
  width:100%;
  display:flex;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  color:#fff;
}

.hero__title{
  font-size:32px;
  font-weight:950;
  letter-spacing:-0.04em;
  margin:0;
}

.hero__subtitle{
  margin-top:8px;
  opacity:.92;
  font-size:14px;
  max-width:520px;
}

.hero__badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.18);
  border:1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px);
  font-weight:800;
}

@media(max-width:720px){
  .hero__bg{min-height:210px;}
  .hero__title{font-size:26px;}
}

/* Tiles like your reference app */
.tile-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
@media(max-width:1100px){
  .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:560px){
  .tile-grid{grid-template-columns:1fr;}
}

.tile{
  border-radius:var(--radius2);
  overflow:hidden;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  box-shadow:0 18px 50px rgba(15,23,42,.10);
  transition: transform .14s ease, box-shadow .14s ease;
}
.tile:hover{
  transform: translateY(-2px);
  box-shadow:0 28px 70px rgba(15,23,42,.14);
}

.tile__img{
  height:120px;
  background:linear-gradient(135deg, rgba(14,165,165,.25), rgba(37,99,235,.22));
  background-size:cover;
  background-position:center;
}
.tile__body{padding:14px;}
.tile__title{
  font-weight:950;
  letter-spacing:-0.02em;
  font-size:15px;
}
.tile__meta{
  margin-top:10px;
  display:grid;
  gap:4px;
  font-size:13px;
  color:rgba(15,23,42,.80);
}
.tile__link{
  margin-top:12px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  color:rgba(14,116,144,1);
  font-weight:900;
}
.tile__link:hover{text-decoration:underline;}

/* Stat chips row */
.chips{
  margin-top:14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(255,255,255,.85);
  border:1px solid rgba(15,23,42,.08);
  box-shadow:0 12px 30px rgba(15,23,42,.06);
  font-weight:900;
}
.chip span{opacity:.8;font-weight:700;}

/* Better stat cards */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
@media(max-width:1000px){
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:520px){
  .stats-grid{grid-template-columns:1fr;}
}

.stat-num{
  font-size:30px;
  font-weight:950;
  margin-top:8px;
  letter-spacing:-0.03em;
}
.stat-sub{
  margin-top:6px;
  opacity:.85;
}

/* Icon bubble */
.ico{
  width:44px;height:44px;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:900;
  background:rgba(15,23,42,.05);
  border:1px solid rgba(15,23,42,.06);
}

/* Nice separators */
.hr{
  height:1px;
  background:rgba(15,23,42,.08);
  margin:14px 0;
}
/* ===== Dashboard polish (mobile spacing + alignment) ===== */

:root{
  --radius-xl:22px;
  --radius-lg:18px;
}

.main{
  padding:18px 0 52px;
}

/* Better card spacing */
.card{
  border-radius:var(--radius-lg);
}

/* Mobile padding improvements */
@media(max-width:520px){

  .wrap{
    padding-left:14px;
    padding-right:14px;
  }

  .main{
    padding-top:14px;
  }

  /* All cards feel more premium */
  .card{
    border-radius:20px;
    padding:16px;
  }

  /* Center text inside stat cards */
  .stat-num{
    text-align:center;
    font-size:34px;
  }

  .stats-grid .card{
    text-align:center;
  }

  .stats-grid .btnrow{
    justify-content:center;
  }
}

/* Hero card should never touch edges */
.hero-card{
  border-radius:26px;
  padding:18px;
  overflow:hidden;
}

/* Hero pills should align nicely */
.hero-pills{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.hero-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(255,255,255,0.10);
  color:#fff;
  font-weight:600;
  font-size:14px;
}

/* On mobile, center pills */
@media(max-width:520px){
  .hero-pills{
    justify-content:center;
  }
}
/* ======================================
   MOBILE OVERFLOW FIX (Trips index page)
====================================== */

/* Prevent any horizontal scrolling */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Make all main wrappers respect screen width */
.wrap, .main {
  width: 100%;
  max-width: 1100px;
  overflow-x: hidden;
}

/* Fix cards / rows that stretch too wide */
.card, .trip-card, .tripitem, .trip-row {
  max-width: 100%;
  overflow: hidden;
}

/* Any flex row must wrap on mobile */
@media (max-width: 640px) {
  .btnrow,
  .trip-actions,
  .trip-meta,
  .trip-badges,
  .trip-toprow {
    flex-wrap: wrap !important;
  }

  /* Fix pill/badge rows */
  .pill,
  .kbadge {
    max-width: 100%;
    white-space: normal !important;
  }

  /* Fix long titles */
  h1, h2, h3,
  .trip-title {
    word-break: break-word;
    overflow-wrap: anywhere;
  }
}