* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Inter';
  background-color: #f4f4f4;
}

.navbar {
  position: relative;
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
}

.navbarul {
  display: flex;
  gap: 90px;
  list-style: none;
  font-size: 25px;
  font-weight: 500;
  padding: 0;
  margin: 0;
}

.navbarli a {
  text-decoration: none;
  color: black;
}

.signup-button {
  position: absolute;
  right: 200px;
  background-color: #1F6F79;
  color: white;
  padding: 12px 40px;
  border-radius: 40px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.signup-button:hover {
  background-color: #17565e;
}

a {
    text-decoration: none;
    color: black;
}

.main-layout {
  display: flex;
  height: calc(100vh - 120px);
}

/* SIDEBAR */
.sidebar {
  width: 250px;
  background-color: #2E2E2E;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
}

/* CONTENT AREA */
.content {
  flex: 1;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px;
}
.content:has(.packages-box.is-empty) {
  justify-content: center;
}

.navbar-center2 {
  width: 100%;
  margin-bottom: 20px;
  display: flex; 
  justify-content: center;
}

.navbarul2 {
  display: flex;
  gap: 90px;
  list-style: none;
  font-size: 25px;
  font-weight: 300;
  padding: 0;
  margin: 0;
  justify-content: center; /* center nav items */
}

.navbarli2 a {
  text-decoration: none;
  color: black;
  font-size: 25px;
  line-height: 1;
}


.navbarli2.selected a {
  color: black;
  font-weight: 550;
  font-size: 30px;
  transition: 0.5s;
}


.text-under-shipped {
  margin-top: 40px;
  align-items: center;
  font-size: 20px;
}


.packages-box {
  width: 100%;
  background-color: #ffffff;
  border-radius: 40px;
  margin-top: 40px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px, rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px, rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
  box-sizing: border-box;
  align-self: stretch;
}

.packages-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 150px 130px 170px;
  column-gap: 20px;
  height: 74px;
  background-color: #1F6F79;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  color: white;
  padding: 20px;
  font-weight: 500;
}

.packages-header span {
  align-self: center;
}

.package-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 150px 130px 170px; 
  column-gap: 20px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
}


.package-row:last-child {
  border-bottom: none;
}

.package-btn {
  background-color: #ffffff;
  border: 1px solid #1F6F79;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.consolidation-btn {
  background-color: #ffffff;
  border: 1px solid #1F6F79;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.package-btn:hover {
  background-color: #f5f5f5;
}

.package-row .package-btn {
  justify-self: start;
}

.package-summary {
  background-color: #f5f8fc;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.summary-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.status {
  color: green;
  font-weight: 600;
}

.send-btn {
  background-color: #43a2cc;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
}

.package-details {
  margin-top: 20px;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px 40px;
  font-size: 14px;
}


.package-details {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.4s ease;
  grid-column: 1 / -1;
  margin-top: 0;
  padding: 0 10px;
  background-color: #f4f4f4;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 40px;
  font-size: 14px;
}

.package-row.open .package-details {
  max-height: 500px;
  opacity: 1;
  margin-top: 10px;
  padding: 15px 10px 10px 10px;
}

.package-btn.view-details {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.package-btn.view-details.active {
  background-color: #1F6F79;
  color: white;
}

.package-btn.add-to-bundle {
  transition: background-color 0.3s ease, color 0.3s ease, width 0.3s ease;
  background-color: white;
  justify-self: center;
  border: 1px solid #1F6F79;
  width: 118px;
  position: relative;
  overflow: hidden;
  text-indent: -9999px; /* hide original text */
}

/* show text with pseudo-element */
.package-btn.add-to-bundle::after {
  content: 'Add to Bundle';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  text-indent: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.1s ease-in 0.3s; /* delay until width transition ends */
  opacity: 1;
  color: black;
}

/* active state */
.package-btn.add-to-bundle.active {
  background-color: #1F6F79;
  color: white;
  width: 160px;
}

/* switch text AFTER animation finishes */
.package-btn.add-to-bundle.active::after {
  content: 'Remove from Bundle';
  color: white;
  transition-delay: 0.3s;
}

.consolidation-btn {
  background-color: #ffffff;
  border: 1px solid #1F6F79;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  opacity: 0;
  margin: auto; /* centers the button in its grid/column */
  transition: width 0.4s ease, opacity 0.3s ease;
}

.consolidation-btn.show {
  width: 170px;
  opacity: 1;
}


.consolidation-header {
  background-color: #1a1a1a;
  color: white;
  padding: 14px 70px;
  margin: 0 auto 0 auto;
  margin-top: 60px;
  text-align: center;
  border-radius: 20px 20px 0 0;
  width: fit-content;
  max-width: 90%;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

.consolidation-header span {
  display: block;
  font-size: 18px;
  font-weight: bold;
}

.consolidation-header p {
  margin: 0;
  font-size: 14px;
  color: #bbbbbb;
}

.packages-box {
  margin-top: 0;
  position: relative;
  z-index: 0;
}


.side-nav{
  padding:24px 16px;
  color:#fff;
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
}

.side-title{
  font-size:18px;
  font-weight:600;
  letter-spacing:.3px;
  opacity:.9;
  margin-bottom:6px;
}

.side-menu{
  list-style:none;
  display:grid;
  gap:6px;
  margin:0;
  padding:0;
}

.side-menu a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  width:100%;
  border-radius:14px;
  color:rgba(255,255,255,.9);
  text-decoration:none;
  font-weight:500;
  transition:background .2s ease, color .2s ease, box-shadow .2s ease;
}

.side-menu a:hover{
  background:#3a3a3a;
  color:#fff;
}

/* active page */
.side-menu a.active{
  background:#1F6F79;
  color:#fff;
  box-shadow:0 6px 18px rgba(31,111,121,.35);
}

/* tiny dot indicator (optional) */
.side-menu a::before{
  content:"";
  width:8px; height:8px; border-radius:50%;
  background:transparent;
  transition:background .2s ease;
}
.side-menu a.active::before{ background:#fff; }

.packages-box.is-empty {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  margin: auto;
  align-self: center;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-top: 0;
}

.packages-box.is-empty .empty-state {
  text-align: center;
  max-width: 520px;
  padding: 24px;
}

.empty-state {
  text-align: center;
  max-width: 520px;
  padding: 24px;
}

.empty-state h3 { margin: 0 0 8px; font-weight: 600; }
.empty-state p  { margin: 0 0 12px; color: #6b7280; }

.primary-btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  background: #111827;
  color: #fff;
}

/* ===== Mobile layout (<=900px) ===== */
@media (max-width: 900px){

  /* Base */
  html, body { background: #f7f7f7; }
  .content { padding: 16px; }

  /* Navbar → sticky, 3-column (hamburger | center | CTA) */
  .navbar{
    position: sticky; top: 0; z-index: 1000;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center; gap: 12px;
    height: auto;
    padding: 8px 12px 10px;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid #e5e7eb;
  }
  .navbarul{ display: none; }      /* hide desktop menu */
  .signup-button{
    position: static; right: auto;
    padding: 10px 16px; font-size: 16px;
    border-radius: 999px;
  }

  /* Hamburger (assumes .dash-toggle with 3 spans exists in HTML) */
  .dash-toggle{
    display: inline-grid;
    width: 38px; height: 38px; place-items: center;
    border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
  }
  .dash-toggle span{
    display: block; width: 18px; height: 2px; background: #334155; border-radius: 2px;
  }
  .dash-toggle span + span{ margin-top: 4px; }

  /* Layout collapses; sidebar becomes a drawer */
  .main-layout{ display: block; height: auto; }
  .sidebar{
    position: fixed; inset: 0 auto 0 0; z-index: 1100;
    width: min(84vw, 320px);
    background: #2E2E2E; border-radius: 0 20px 20px 0;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.12);
  }
  .sidebar.open, .sidebar.is-open{ transform: translateX(0); }
  .sidebar-overlay{
    position: fixed; inset: 0; z-index: 1090;
    display: none; background: rgba(0,0,0,.38); backdrop-filter: blur(2px);
  }
  .sidebar-overlay.show{ display: block; }

  /* Top filter bar becomes scrollable pills */
  .navbar-center2{ width: 100%; margin-bottom: 10px; }
  .navbarul2{
    display: flex; gap: 16px; padding: 6px 0; margin: 0;
    font-size: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }
  .navbarul2::-webkit-scrollbar{ display: none; }
  .navbarli2 a{ font-size: 16px; }
  .navbarli2.selected a{ font-size: 17px; font-weight: 600; }

  /* Packages container → lighter card */
  .packages-box{
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    margin-top: 16px;
  }
  .packages-header{ display: none; }

  /* Package rows → 2-col card layout; buttons full-width */
  .package-row{
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 14px;
  }
  /* Name */
  .package-row > span:nth-child(1){
    grid-column: 1 / -1; font-weight: 600;
  }
  /* Tracking */
  .package-row > span:nth-child(2){
    grid-column: 1 / -1; font-size: 13px; color: #374151;
  }
  /* Arrival (3) stays left; Status (4) aligns right */
  .package-row > span:nth-child(4){ justify-self: end; }

  /* Buttons fill row */
  .package-btn,
  .consolidation-btn{
    grid-column: 1 / -1;
    width: 100%;
    border-radius: 999px;
    padding: 12px 16px;
  }

  /* Simplify the animated “Add to Bundle” button on mobile */
  .package-btn.add-to-bundle{
    width: 100% !important;
    text-indent: 0 !important;
  }
  .package-btn.add-to-bundle::after{ display: none !important; }
  .package-btn.add-to-bundle.active{ background: #1F6F79; color: #fff; }

  .consolidation-btn{ opacity: 1; width: 100%; }
  .consolidation-btn.show{ width: 100%; }

  /* Details block stacks in one column */
  .package-details{
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 8px;
  }

  .text-under-shipped{ font-size: 16px; margin-top: 20px; }

  /* Empty state spacing */
  .packages-box.is-empty{ margin: 12px auto 0; }
  .empty-state{ padding: 16px; }
}

