/* ==================================================
   PARTS / Driveandgo — MASTER.CSS (WARM LIGHT)
   FINAL / STABLE
================================================== */

/* ================= FONT (optional) ================= */
/* ================= ROOT ================= */
:root{
  --header-h:72px;
  --header-z:6000;
  --container:1200px;

  /* accent */
  --brand:#e98743;
  --brand-2:#f0a15e;
  --brand-soft:rgba(233,135,67,.14);

  /* bg */
  --bg-main:#f7f2eb;
  --bg-header:rgba(255,255,255,.95);
  --bg-card:rgba(255,255,255,.96);
  --bg-card-2:rgba(255,248,241,.96);
  --bg-soft:rgba(233,135,67,.06);

  /* text */
  --text-main:#17120d;
  --text-muted:rgba(31,23,18,.68);
  --text-dim:rgba(31,23,18,.52);

  /* ui */
  --border:rgba(31,23,18,.08);
  --border-2:rgba(31,23,18,.12);

  --radius-sm:12px;
  --radius-md:16px;
  --radius-lg:20px;

  --shadow-sm:0 12px 30px rgba(45,28,16,.08);
  --shadow-md:0 18px 45px rgba(45,28,16,.12);
  --shadow-header:0 10px 30px rgba(45,28,16,.10);
  --shadow-pop:0 22px 60px rgba(45,28,16,.14);

  --glass-blur:14px;

  --glow:0 0 0 1px rgba(233,135,67,.18), 0 0 28px rgba(233,135,67,.14);
  --glow-strong:0 0 0 1px rgba(233,135,67,.26), 0 0 44px rgba(233,135,67,.20);
}

@media (max-width:768px){
  :root{ --header-h:56px; }
}

/* ================= RESET-ish ================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }

html.app-booting *,
html.app-booting *::before,
html.app-booting *::after{
  animation: none !important;
  transition: none !important;
}

a{ color:inherit; }
img{ max-width:100%; display:block; }

/* ================= BODY / BACKGROUND ================= */
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color:var(--text-main);

  background:#f7f2eb;

  overflow-x:hidden;
  overflow-y:scroll;
}

/* ================= PAGE ================= */
.page{
  min-height:100vh;
  min-height:100svh;
  min-height:100dvh;
  padding-top:0;
  display:flex;
  flex-direction:column;
}
.page .page{ padding-top:0 !important; }

/* ================= CONTAINER ================= */
.container{
  width:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:22px 20px;
}
.container .container{
  max-width:100%;
  padding-left:0;
  padding-right:0;
}

/* ================= SECTION ================= */
.section{
  width:100%;
  margin:22px 0;
}

/* ================= TYPOGRAPHY ================= */
h1,h2,h3,h4{
  margin:0 0 10px 0;
  letter-spacing:.2px;
}
p{
  margin:0 0 10px 0;
  color:var(--text-muted);
  line-height:1.5;
}
.muted{ color:var(--text-muted); }
.dim{ color:var(--text-dim); }

hr{
  border:none;
  height:1px;
  background:rgba(255,255,255,.08);
  margin:18px 0;
}

/* ==================================================
   HEADER / MENU
================================================== */
.menu{
  position:relative;
  top:auto; left:auto; right:auto;
  height:var(--header-h);
  z-index:var(--header-z);

  display:flex;
  align-items:center;

  background:var(--bg-header);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));

  border-bottom:1px solid rgba(31,23,18,.08);
  box-shadow:var(--shadow-header);
  transition:background .2s ease, border-color .2s ease, box-shadow .2s ease;
  will-change:transform;
  transform:translateZ(0);
}

.menu-inner{
  width:100%;
  max-width:var(--container);
  height:100%;
  margin:0 auto;
  padding:0 20px;

  display:flex;
  align-items:center;
  gap:16px;
}

@media (max-width:768px){
  .menu-inner{ padding:0 14px; }
}

.menu-logo{
  display:flex;
  align-items:center;
  gap:10px;
  margin-right:auto;
  font-weight:900;
  text-decoration:none;
}
.menu-logo img{ height:34px; }
.menu-logo__text{
  font-size:22px;
  font-weight:1000;
  line-height:1;
  letter-spacing:.04em;
  white-space:nowrap;
  color:#171411;
}

.menu-center{
  display:flex;
  align-items:center;
  gap:14px;
}

.menu-left{
  display:flex;
  align-items:center;
  gap:14px;
}

.menu-item{
  padding:8px 12px;
  border-radius:12px;

  color:rgba(234,240,255,.84);
  text-decoration:none;
  font-weight:800;
  font-size:14px;

  transition:.15s ease;
}
.menu-item:hover{
  background:rgba(233,135,67,.06);
  color:var(--text-main);
}

.menu-right{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
}

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

.dropdown-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:40px;
  padding:5px 9px 5px 6px;
  border-radius:16px;
  border:1px solid rgba(233,135,67,.14);
  background:#fff8f1;
  color:#e98743;
  box-shadow:0 6px 16px rgba(233,135,67,.08);
  cursor:pointer;
  transition:.15s ease;
}

.dropdown-toggle:hover{
  background:#fff;
  border-color:rgba(233,135,67,.22);
  box-shadow:0 10px 22px rgba(233,135,67,.12);
}

.dropdown-toggle img{
  width:30px;
  height:30px;
  border-radius:10px;
  object-fit:cover;
  background:#fff1e6;
  box-shadow:none;
}

.dropdown-toggle i{
  font-size:14px;
  color:#e98743;
}

.mobile-icons{
  align-items:center;
  gap:8px;
}

.mobile-icons a{
  width:38px;
  height:38px;
  border-radius:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--brand);
  background:rgba(233,135,67,.10);
  border:1px solid rgba(233,135,67,.14);
  text-decoration:none;
}

.mobile-icons a:hover{
  background:rgba(233,135,67,.16);
  box-shadow:var(--glow);
}

/* header icon buttons */
.header-icon{
  position:relative;
  width:40px;
  height:40px;

  display:flex;
  align-items:center;
  justify-content:center;

  border-radius:14px;
  background:transparent;
  border:1px solid transparent;
  cursor:pointer;

  color:var(--brand);
  font-size:18px;

  transition:.15s ease;
}
.header-icon:hover{
  background:rgba(233,135,67,.10);
  border-color:rgba(233,135,67,.18);
  box-shadow:var(--glow);
}
.header-icon:active{ transform:scale(.97); }

.header-profile-toggle__avatar,
.header-profile-toggle__chevron{
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.header-profile-toggle:not(.header-profile-toggle--chevron) .header-profile-toggle__avatar{
  width:100%;
  height:100%;
}

.header-profile-toggle--chevron{
  width:auto;
  min-width:62px;
  padding:0 10px 0 0;
  gap:8px;
}

.header-profile-toggle--chevron .header-profile-toggle__avatar{
  width:40px;
  height:40px;
  border-radius:inherit;
}

.header-profile-toggle__chevron{
  font-size:14px;
  opacity:.78;
}

/* badge */
.header-icon .badge{
  position:absolute;
  top:-6px;
  right:-6px;

  min-width:18px;
  height:18px;
  padding:0 5px;

  border-radius:999px;
  background:var(--brand);
  color:#071016;

  font-size:11px;
  font-weight:900;

  display:flex;
  align-items:center;
  justify-content:center;

  box-shadow:var(--glow);
}
.header-icon .badge:empty{ display:none; }

/* mobile visibility helpers */
.desktop-only{ display:flex; }
.mobile-only{ display:none; }

@media (max-width:1024px){
  .desktop-only{ display:none !important; }
  .mobile-only{ display:flex !important; }
}

.menu-burger{
  overflow:hidden;
}

.menu-burger__box{
  width:18px;
  height:14px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.menu-burger__line{
  display:block;
  width:100%;
  height:2px;
  border-radius:999px;
  background:currentColor;
  transform-origin:center;
  transition:transform .2s ease, opacity .2s ease;
}

.menu-burger.is-active,
.menu-burger[aria-expanded="true"]{
  background:rgba(233,135,67,.10);
  border-color:rgba(233,135,67,.18);
  box-shadow:var(--glow);
}

.menu-burger.is-active .menu-burger__line:nth-child(1){
  transform:translateY(6px) rotate(45deg);
}

.menu-burger.is-active .menu-burger__line:nth-child(2){
  opacity:0;
}

.menu-burger.is-active .menu-burger__line:nth-child(3){
  transform:translateY(-6px) rotate(-45deg);
}

.mobile-menu-overlay,
.mobile-menu{
  display:none;
}

@media (max-width:1024px){
  body.menu-open{
    overflow:hidden;
  }

  .menu-right{
    gap:8px;
  }

  .header-icon{
    width:38px;
    height:38px;
    border-radius:13px;
  }

  .mobile-menu-overlay,
  .mobile-menu{
    display:block;
  }

  .mobile-menu-overlay{
    position:fixed;
    inset:var(--header-h) 0 0 0;
    background:rgba(4,8,12,.68);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .22s ease, visibility .22s ease;
    z-index:8900;
  }

  .mobile-menu-overlay.is-open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
  }

  .mobile-menu{
    position:fixed;
    top:calc(var(--header-h) + 10px);
    left:12px;
    width:min(380px, calc(100vw - 24px));
    max-height:calc(100dvh - var(--header-h) - 22px);
    pointer-events:none;
    z-index:9100;
  }

  .mobile-menu__panel{
    display:flex;
    flex-direction:column;
    gap:18px;
    max-height:inherit;
    padding:18px;
    overflow:auto;
    background:rgba(12,16,22,.94);
    border:1px solid rgba(31,23,18,.08);
    border-radius:22px;
    box-shadow:var(--shadow-pop), var(--glow);
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
    opacity:0;
    transform:translateX(-18px) scale(.98);
    transform-origin:top left;
    transition:transform .24s ease, opacity .24s ease;
  }

  .mobile-menu.is-open{
    pointer-events:auto;
  }

  .mobile-menu.is-open .mobile-menu__panel{
    opacity:1;
    transform:none;
  }

  .mobile-menu__head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
  }

  .mobile-menu__eyebrow{
    margin-bottom:6px;
    color:var(--text-dim);
    font-size:12px;
    font-weight:900;
    letter-spacing:.14em;
    text-transform:uppercase;
  }

  .mobile-menu__title{
    font-size:22px;
    font-weight:900;
    line-height:1.1;
  }

  .mobile-menu__body{
    display:grid;
    gap:18px;
  }

  .mobile-menu__section{
    display:grid;
    gap:10px;
  }

  .mobile-menu__label{
    color:var(--text-dim);
    font-size:12px;
    font-weight:900;
    letter-spacing:.12em;
    text-transform:uppercase;
  }

  .mobile-menu__link,
  .mobile-menu__logout{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 16px;
    border-radius:18px;
    border:1px solid rgba(255,255,255,.08);
    background:rgba(255,255,255,.04);
    color:var(--text-main);
    text-decoration:none;
    transition:.18s ease;
  }

  .mobile-menu__link:hover,
  .mobile-menu__logout:hover{
    background:rgba(233,135,67,.10);
    border-color:rgba(233,135,67,.18);
    box-shadow:var(--glow);
    transform:translateY(-1px);
  }

  .mobile-menu__icon{
    width:40px;
    height:40px;
    flex:0 0 40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:14px;
    background:rgba(233,135,67,.10);
    color:var(--brand);
    font-size:18px;
    box-shadow:inset 0 0 0 1px rgba(233,135,67,.12);
  }

  .mobile-menu__content{
    min-width:0;
    flex:1;
    display:flex;
    flex-direction:column;
    gap:2px;
  }

  .mobile-menu__content strong{
    font-size:15px;
    font-weight:900;
  }

  .mobile-menu__content small{
    color:var(--text-dim);
    font-size:12px;
    line-height:1.35;
  }

  .mobile-menu__arrow{
    color:var(--text-dim);
    font-size:14px;
  }

  .mobile-menu__logout{
    margin-top:4px;
    color:#ffd7d7;
  }

  .mobile-menu__logout .mobile-menu__icon{
    background:rgba(255,87,87,.12);
    color:#ff9a9a;
    box-shadow:inset 0 0 0 1px rgba(255,87,87,.14);
  }

  body.menu-open .appbar{
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(16px);
  }
}

@media (max-width:768px){
  .menu-inner{
    gap:10px;
  }

  .menu-logo img{
    height:32px;
  }

  .menu-right{
    gap:6px;
  }

  .mobile-menu{
    top:calc(var(--header-h) + 8px);
    left:10px;
    width:calc(100vw - 20px);
    max-height:calc(100dvh - var(--header-h) - 18px);
  }

  .mobile-menu__panel{
    padding:16px;
    border-radius:20px;
  }

  .mobile-menu__title{
    font-size:20px;
  }

  .mobile-menu__link,
  .mobile-menu__logout{
    padding:13px 14px;
  }
}

/* ==================================================
   GLASS CARDS / BLOCKS
================================================== */
.card, .panel, .box, .tile, .hero, .block, .surface{
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-sm);

  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.card, .panel, .box, .tile{
  padding:18px 18px;
}

.hero, .top-card{
  padding:22px 24px;
}

.card:hover, .panel:hover, .box:hover, .tile:hover{
  border-color:rgba(233,135,67,.22);
  box-shadow:var(--shadow-md), var(--glow);
  transform: translateY(-1px);
  transition:.18s ease;
}

@media (pointer:coarse), (max-width:1024px){
  .menu,
  .card,
  .panel,
  .box,
  .tile,
  .hero,
  .top-card,
  .surface,
  .notif-box,
  .dropdown-content{
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
  }
}

/* card header row (icon + title) */
.card-title, .panel-title, .tile-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  color:var(--text-main);
  margin:0 0 8px 0;
}
.card-desc, .panel-desc, .tile-desc{
  color:var(--text-muted);
  margin:0 0 14px 0;
}

/* ==================================================
   GRIDS (like 3 cards row)
================================================== */
.grid-3{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:18px;
  margin-top:18px;
}
@media (max-width:1024px){
  .grid-3{ grid-template-columns:1fr; }
}

/* ==================================================
   BUTTONS
================================================== */
.btn, a.btn, button.btn,
.btn-primary, .pill-btn, .btn-main{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:10px 16px;
  border-radius:999px;

  background:rgba(233,135,67,.12);
  color:var(--text-main);

  border:1px solid rgba(233,135,67,.22);
  box-shadow: 0 10px 24px rgba(0,0,0,.35);

  text-decoration:none;
  font-weight:900;
  font-size:13px;

  transition:.15s ease;
  user-select:none;
}

.btn:hover, .btn-primary:hover, .pill-btn:hover, .btn-main:hover{
  background:rgba(233,135,67,.18);
  border-color:rgba(233,135,67,.32);
  box-shadow:var(--glow);
  transform: translateY(-1px);
}

.btn:active, .btn-primary:active, .pill-btn:active, .btn-main:active{
  transform: translateY(0);
}

/* filled (optional, for primary CTA) */
.btn-solid{
  background:#e98743;
  color:#071016;
  border:none;
  box-shadow:var(--glow);
}
.btn-solid:hover{ box-shadow:var(--glow-strong); }

/* disabled / inactive */
.btn.is-disabled, .btn[disabled], .btn.disabled,
button:disabled{
  opacity:.45 !important;
  cursor:not-allowed !important;
  filter:saturate(.6);
  box-shadow:none !important;
  transform:none !important;
}

/* ==================================================
   INPUTS
================================================== */
input, select, textarea{
  width:100%;
  padding:12px 14px;

  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(10,12,16,.55);
  color:var(--text-main);

  outline:none;
  box-shadow:none;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:.15s ease;
}
input::placeholder, textarea::placeholder{
  color:rgba(234,240,255,.45);
}
input:focus, select:focus, textarea:focus{
  border-color:rgba(233,135,67,.30);
  box-shadow:var(--glow);
}

/* ==================================================
   DROPDOWN
================================================== */
.dropdown{ position:relative; }

.dropdown-content{
  position:absolute;
  top:calc(100% + 10px);
  right:0;

  min-width:190px;
  padding:10px;

  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow:var(--shadow-pop);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:.2s ease;

  z-index:7000;
}

.dropdown.open .dropdown-content{
  opacity:1;
  visibility:visible;
  transform:none;
}

.dropdown-content a{
  display:block;
  padding:10px 12px;
  border-radius:12px;

  text-decoration:none;
  font-weight:900;
  color:rgba(234,240,255,.88);
}
.dropdown-content a:hover{
  background:rgba(233,135,67,.12);
  box-shadow:inset 0 0 0 1px rgba(233,135,67,.16);
}

/* ==================================================
   NOTIFICATIONS (optional)
================================================== */
.notif-wrap{ position:relative; }

.notif-box{
  position:absolute;
  top:calc(100% + 12px);
  right:0;

  width:320px;
  max-height:420px;
  overflow:auto;

  background:var(--bg-card-2);
  border:1px solid var(--border);
  border-radius:18px;
  box-shadow:var(--shadow-pop);

  padding:10px;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  opacity:0;
  visibility:hidden;
  transform:translateY(8px);
  transition:.2s ease;

  z-index:7000;
}

.notif-wrap.open .notif-box{
  opacity:1;
  visibility:visible;
  transform:none;
}

@media (max-width:768px){
  .notif-box{
    position:fixed;
    top:var(--header-h);
    left:12px;
    right:12px;
    width:auto;
    max-height:70vh;
  }
}

/* ==================================================
   TABLE (optional)
================================================== */
table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(10,12,16,.45);
}
th, td{
  padding:12px 14px;
  border-bottom:1px solid rgba(233,135,67,.06);
  color:rgba(234,240,255,.86);
  font-size:13px;
}
th{
  color:rgba(234,240,255,.75);
  text-align:left;
  font-weight:900;
}
tr:hover td{
  background:rgba(233,135,67,.06);
}

/* ==================================================
   FOOTER
================================================== */
.footer{
  margin-top:auto;
  padding:18px;
  text-align:center;
  font-size:13px;

  color:rgba(234,240,255,.70);
  background:rgba(10,12,16,.70);

  border-top:1px solid rgba(255,255,255,.08);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ==================================================
   SMALL HELPERS
================================================== */
.round{ border-radius:999px !important; }
.shadow{ box-shadow:var(--shadow-sm) !important; }
.glow{ box-shadow:var(--shadow-md), var(--glow) !important; }

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


/* ==================================================
   MOBILE APP MENU (BOTTOM) — Driveandgo
================================================== */
:root{ --appbar-h: 72px; }

.appbar{ display:none; }

@media (max-width: 820px){

  /* hide mobile icons in top header (we use bottom appbar) */
  .menu-center.mobile-only{ display:none !important; }
  .menu-left.mobile-icons{ display:none !important; }
  .header-icon--favorites{ display:none !important; }
  .menu-right > #profileDropdown{ display:none !important; }

  /* prevent content from hiding behind bottom bar */
  body{
    padding-bottom: calc(var(--appbar-h) + 28px);
    padding-bottom: calc(var(--appbar-h) + env(safe-area-inset-bottom) + 28px);
    scroll-padding-bottom: calc(var(--appbar-h) + 28px);
    scroll-padding-bottom: calc(var(--appbar-h) + env(safe-area-inset-bottom) + 28px);
  }

  .page{
    min-height:100svh;
    min-height:100dvh;
  }

  .appbar{
    display:grid;
    position:fixed;
    left:12px;
    right:12px;
    bottom:12px;
    height: var(--appbar-h);
    z-index: 9000;

    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap:10px;
    align-items:center;

    padding:10px;

    background: rgba(10,12,16,.72);
    border: 1px solid rgba(31,23,18,.08);
    border-radius: 22px;

    box-shadow: 0 18px 45px rgba(0,0,0,.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition:opacity .22s ease, transform .22s ease, visibility .22s ease;
  }

  .appbar__item{
    position:relative;
    height:100%;
    border-radius: 18px;

    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;

    text-decoration:none;
    color: rgba(234,240,255,.78);
    transition:.15s ease;
  }

  .appbar__item:hover{ background: rgba(233,135,67,.06); }

  .appbar__ico{
    font-size: 20px;
    color: var(--brand, #e98743);
    line-height:1;
  }

  .appbar__txt{
    font-size: 11px;
    font-weight: 900;
    letter-spacing:.2px;
    opacity:.9;
  }

  .appbar__item.is-active{
    background: rgba(233,135,67,.14);
    border: 1px solid rgba(233,135,67,.22);
    box-shadow: 0 0 0 1px rgba(233,135,67,.12), 0 0 22px rgba(233,135,67,.12);
    color: rgba(234,240,255,.95);
  }

  .appbar__badge{
    position:absolute;
    top:8px;
    right:10px;

    min-width:18px;
    height:18px;
    padding:0 6px;

    border-radius:999px;
    background: var(--brand, #e98743);
    color:#071016;

    font-size:11px;
    font-weight:1000;

    display:none;
    align-items:center;
    justify-content:center;
  }

  /* center FAB */
  .appbar__item--fab{
    transform: translateY(-14px);
    background: #e98743;
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 45px rgba(0,0,0,.55), 0 0 34px rgba(233,135,67,.22);
    color:#071016;
  }

  .appbar__item--fab .appbar__ico{
    color:#071016;
    font-size: 24px;
  }

  .appbar__item--fab .appbar__txt{
    color:#071016;
    opacity:.9;
  }
}


