/* =========================
   Core variables
========================= */
:root{
  --color-sub:#2d2d39;
  --color-sub-light:#118dd4;
  --color-light:#ccc;
  --color-white:#fff;

  /* mobile bottom bar theme */
  --bn-text:#ffffff;
  --bn-text-active:#60a5fa;

  --header-h: 140px;     /* desktop header visual height */
}


/* =========================
   Base + layout
========================= */
html{scroll-behavior:smooth; overflow-y:scroll;}
body{display:block;}
.container,.container--narrow{
  max-width:1960px; margin:0 auto; padding:0 20px; box-sizing:border-box;
}
.main-content{
  padding-top: calc(var(--header-h) + 16px);
}

/* =========================
   Global UI atoms
========================= */
.btn--sub{background-color:var(--color-sub-light);}
.card{border:2px solid var(--color-light);}
.table-card{background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 0 0 rgba(0,0,0,.1);}
img{width:100%;}
.tag>i.im{font-size:1.5rem;margin-right:.5rem;}
.content-box{width:95%;max-width:85rem;margin:0 auto;}

.badge{display:inline-block;padding:.25rem .5rem;font-size:1rem;font-weight:600;border-radius:4px;text-transform:uppercase;}
.badge--success{background:#28a745;color:#fff;}
.badge--warning{background:#dc3545;color:#fff;}
.badge--light{background:#f0f0f0;color:#333;}

.toggle-details{color:var(--color-sub-light);font-size:1.4em;transition:color .2s;}
.toggle-details:hover,.toggle-details:focus{color:var(--color-sub-light);}

.header__menuItem.active>a{color:var(--color-sub-light);}

/* =========================
   Header (desktop/tablet)
========================= */
.header{
  position:fixed;top:0;left:0;width:100%;z-index:111;
  background:#000;padding:1rem 0;
}
.header>.container{display:flex;justify-content:space-between;align-items:center;}

.header__left{display:flex;align-items:center;gap:3rem;} /* logo + main menu */
.header__logo img{display:block;height:115px;width:auto;}

.header__nav{display:block;}
.header__menu{
  display:flex;align-items:center;gap:3.6rem;
  margin:0;padding:0;list-style:none;
}
.header__menuItem>a{color:var(--color-light);font-weight:300;text-decoration:none;}


/* Round icon buttons (Account avatar + Help) */
.header__menuItem--icon a{
  display:inline-flex;align-items:center;justify-content:center;
  width:30px;height:30px;padding:0;border-radius:50%;
  line-height:0;vertical-align:middle;
}

/* Logout aligns with icons */
.header__menu .btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:36px;line-height:1;padding:0 14px;vertical-align:middle;
}

/* === Desktop header icons: ensure SVGs are visible === */
/* Base color (matches other header links) */
.header__nav--right .header__menuItem--icon a {
  color: var(--color-light);
}

/* Hover/active = your brand blue */
.header__nav--right .header__menuItem--icon a:hover,
.header__nav--right .header__menuItem--icon.active a {
  color: var(--color-sub-light);
}

/* Force SVGs to follow text color even if an upstream fill tries to override */
.header__menuItem--icon a svg,
.header__menuItem--icon a svg * {
  fill: currentColor !important;
  stroke: currentColor !important; /* covers stroke-only icons */
}

/* Slightly wider spacing for left/primary menu only */
.header__left .header__menu{gap:4.2rem;}

/* Right strip: Account • Help • Logout – tighter spacing */
.header__nav--right .header__menu {
  gap: 2rem;          /* try 0.8–1.2rem; current is larger */
}

.header__nav--right .header__menu > li {
  margin: 0;            /* guard against stray margins */
}

.header__nav--right .header__menu .btn {
  margin-left: 0;       /* ensure Logout doesn’t add extra space */
}

/* Remove the blue ring from the Account avatar everywhere */
.header__menuItem--icon a .avatar,
.header__menuItem--icon a:hover .avatar,
.header__menuItem--icon a:focus .avatar,
.header__menuItem--icon a:focus-visible .avatar,
.header__menuItem--icon.active a .avatar {
  box-shadow: none !important;
  outline: none !important;
  border: 0 !important;
}

/* Also remove it inside the mobile “More” popup */
.more-menu a .avatar--menu {
  box-shadow: none !important;
  outline: none !important;
  border: 0 !important;
}

/* Only grow the Help icon button */
.header__menuItem--icon a[aria-label="Help"]{
  width:38px;  /* was 30px */
  height:38px; /* was 30px */
}
.header__menuItem--icon a[aria-label="Help"] svg{
  width:38px;
  height:38px;
}

/* =========================
   Pagination
========================= */
.pagination{margin:8rem 0 10rem;}
.pagination>ul{
  list-style:none;display:flex;align-items:center;justify-content:center;
  gap:1rem;flex-wrap:wrap;margin:0;padding:0;
}
.pagination .btn{color:var(--color-sub);}
.pagination .btn.btn--sub{color:var(--color-light);}

/* =========================
   Auth pages
========================= */
.auth{
  padding-top: calc(var(--header-h) + 30px);
  width:100%;position:relative;z-index:1;background:transparent;
  display:flex;justify-content:center;align-items:center;
  padding:15rem 0;
}
.auth::after{content:'';position:fixed;inset:0;opacity:.1;z-index:-1;}
.auth>.card{padding:3rem 4rem;width:95%;max-width:65rem;}
.auth__header h3{color:var(--color-sub);font-weight:700;margin-top:1rem;}
.auth__form{margin:3rem 0;}
/* .auth .auth__form label,.auth .auth__alternative p{font-size:1.4rem;font-weight:500;color:var(--color-sub-light);} */
.auth .auth__actions{display:flex;justify-content:space-between;align-items:center;margin:2.5rem 0;}
/* .auth .auth__actions a{text-decoration:underline;} */
/* .auth .auth__alternative a{font-size:2rem;font-weight:500;} */

/* =========================
   Forms
========================= */
.formPage .formWrapper{
  background:#fff;padding:3.5rem 5rem;border:2px solid var(--color-light);border-radius:.7rem;
}
.formPage .formWrapper__subject{font-size:2.8rem;color:var(--color-sub);margin:2rem 0 1rem;}

/* =========================
   Alerts (fixed)
========================= */
.alert{
  position:fixed;left:50%;top:120px;transform:translate(-50%,-50%);z-index:99999;
}

/* =========================
   Chat
========================= */
.messages-box{flex:1;overflow-wrap:anywhere;}
.messages-list{padding-left:0;}
.message{margin-bottom:5px;list-style:none;}
.message-text{padding:10px;border-radius:5px;}
.sent,.received{background:#fff;}
.message-form{
  position:sticky;bottom:60px;width:90%;
  margin:0 auto;background:#ecece9;border-radius:15px;padding:20px;display:flex;flex-direction:column;
}
.message-input{width:80%;height:55px;border-color:var(--color-sub-light);border-radius:5px;}
.btn-send{border-radius:10;}

/* Chat container */
.chat-container{
  padding-top:110px;position:relative;height:100%;width:1000px;margin:0 auto -30px;display:flex;flex-direction:column;overflow:visible;
}
.message:not(:last-child){border-bottom:2px solid #f6f6f6;}

/* =========================
   Loader / Spinner
========================= */
#loader-container{position:relative;z-index:2;}
#loader-container .spinner{
  width:40px;height:40px;border:4px solid #e3f2fc;border-top-color:#118dd4;border-radius:50%;
  animation:spin 1s linear infinite;margin:auto;
}
#progress-text{color:#118dd4;font-size:16px;margin-top:50px;}
@keyframes spin{to{transform:rotate(360deg);}}

/* =========================
   Copy / Like buttons
========================= */
.copy-btn{
  background:var(--color-sub-light);color:#fff;border:0;border-radius:5px;
  padding:5px 10px;font-size:12px;cursor:pointer;margin-top:5px;transition:background .3s;
}
.copy-btn:hover{background:#0f7bb8;}
.copy-btn:active{background:#0d6aa3;}

.like-toggle-btn{
  background:transparent;color:var(--color-sub-light);border:1px solid var(--color-sub-light);
  border-radius:5px;margin:5px 0 60px 5px;padding:5px 10px;font-size:12px;cursor:pointer;transition:background .3s;
}
.like-toggle-btn:hover{background:#ecf6fb;}
.like-toggle-btn:active{background:#d5edf9;}
.like-toggle-btn.is-liked{background:#4caf50;border-color:#4caf50;color:#fff;}

/* =========================
   Filters (shared)
========================= */
.filters-row,
.filter-container{
  position:fixed;left:50%;transform:translateX(-50%);z-index:9999;display:flex;gap:20px;
}
.filter-container{top:135px;background:#fff;padding:10px;border-radius:5px;box-shadow:0 2px 5px rgba(0,0,0,.1);}
.filters-row{top:150px;}
.day-filter-container,
.project-filter-container{
  background:#fff;padding:10px;border-radius:5px;box-shadow:0 2px 5px rgba(0,0,0,.1);border:2px solid #dddcdc;
}
.date-filter-buttons,.project-buttons{display:flex;gap:10px;}
.date-filter-btn,
.project-filter-btn{
  padding:8px 16px;border:1px solid var(--color-light);border-radius:5px;background:#fff;color:#333;
  font-size:14px;text-decoration:none;cursor:pointer;transition:background .3s,color .3s;
}
.date-filter-btn:hover,.project-filter-btn:hover{background:#f0f0f0;}
.date-filter-btn.active{background:var(--color-sub-light);color:#fff;border-color:var(--color-sub-light);}
.project-filter-btn.active{background:var(--color-sub-light);color:#fff;border-color:var(--color-sub-light);}

/* =========================
   Misc
========================= */
.pending-banner{
  position:fixed;top:15%;left:50%;transform:translate(-50%,-50%);
  white-space:nowrap;background:#eef6fb;color:#055160;padding:.75rem;border-radius:4px;z-index:9999;
}
.scroll-buttons{position:fixed;bottom:150px;left:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:10px;z-index:1500;}
.scroll-btn{
  background:#fff;border:1px solid var(--color-light);border-radius:50%;
  width:40px;height:40px;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 2px 5px rgba(0,0,0,.1);padding:0;
}

/* Mobile-only UI: hide by default (desktop/tablet) */
.bottom-nav { display: none; }

/* =========================
   Mobile (≤ 1024px)
========================= */
@media (max-width:1024px){

  .bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  display: flex;          /* key: make it a flex container */
  align-items: stretch;
  justify-content: space-between;

  /* whatever you already had here (background, border, etc.) */
}


  :root{ --header-h: 92px; 
  --bottom-nav-h: 64px;}        /* your mobile logo height */

  /* center the only remaining child (logo) */
  .header > .container {
    justify-content: center;
  }

  /* remove leftover gap from the (logo + nav) group */
  .header__left {
    gap: 0;
  }

  /* belt-and-suspenders: make the logo anchor + image center themselves */
  .header__logo {
    margin: 0 auto;
  }
  .header__logo img {
    display: block;
    margin-inline: auto;
    /* you already set height:92px here; keep it if you like */
  }  

  .auth{
    padding-top: calc(var(--header-h) + 30px);
    padding-bottom: calc(var(--bottom-nav-h)
                         + max(env(safe-area-inset-bottom), 8px) + 18px);
    min-height: calc(100dvh - var(--header-h) - var(--bottom-nav-h));
  }

  .chat-container{margin-top:130px;}
  .copy-btn,.like-toggle-btn{border-radius:3px;padding:3px 6px;font-size:8px;}
  .main-content{padding-top:130px;}
  .header__nav{display:none;}               /* hide desktop menus */
  .header__logo img{height:92px;}
  .filter-container{top:110px;}
  .filters-row{top:120px;}

  /* Bottom navigation */
  .bottom-nav{
    position:fixed;left:0;right:0;bottom:0;width:100%;
    display:flex;justify-content:space-evenly;align-items:center;height:64px;
    padding-bottom:max(env(safe-area-inset-bottom),8px);
    background:#1f2937;border-top:1px solid rgba(255,255,255,.08);z-index:2147483647;
    transform:translateZ(0);backface-visibility:hidden;will-change:transform;
  }
  
  .bottom-nav .tab{
    display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    padding-top:6px;border:0;background:transparent;color:var(--bn-text);font-size:10px;line-height:1;text-decoration:none;
  }
  .bottom-nav .tab svg{width:20px;height:20px;fill:currentColor;}
  .bottom-nav .tab.active,
  .bottom-nav .tab.active span,
  .bottom-nav .tab.active svg{color:var(--bn-text-active);fill:var(--bn-text-active);stroke:var(--bn-text-active);opacity:1;}

  /* More popup */
  .more-menu[hidden]{display:none !important;}
  .more-menu{
    position:fixed;right:10px;bottom:calc(64px + max(env(safe-area-inset-bottom),8px) + 6px);
    background:#0f172a;color:#e5e7eb;border-radius:12px;min-width:210px;padding:6px;z-index:1600;
    box-shadow:0 18px 40px rgba(0,0,0,.35),0 2px 8px rgba(0,0,0,.25);
  }
  .more-menu::after{
    content:"";position:absolute;right:24px;bottom:-8px;border-width:8px 8px 0 8px;border-style:solid;border-color:#0f172a transparent transparent transparent;
  }
  .more-menu ul{margin:0;padding:0;list-style:none;}
  .more-menu li+li{margin-top:4px;}
  .more-menu a{
    display:flex;align-items:center;gap:10px;padding:10px 12px;color:inherit;text-decoration:none;border-radius:8px;
  }
  .more-menu a:hover,.more-menu a:focus-visible{background:rgba(255,255,255,.08);outline:none;}
  .more-menu a svg,
  .more-menu a .avatar--menu { width: 24px !important; height: 24px !important; display:block; flex:0 0 24px; margin:0; }

  /* Make icons visible in the dark More menu */
  .more-menu { color: #fff; }                /* base color for menu */
  .more-menu a { color: inherit !important; }

  .more-menu a svg {
    width: 24px; height: 24px; flex: 0 0 24px;
    fill: currentColor !important;           /* for solid-path icons */
    stroke: currentColor !important;         /* for stroke-only icons */
  }

  .more-menu a svg * {                       /* cover paths, lines, circles, etc. */
    fill: currentColor !important;
    stroke: currentColor !important;
  }

  /* === More popup: make ALL labels white & consistent === */
  .more-menu,
  .more-menu a,
  .more-menu a span {
    color: #fff !important;
    font-family: inherit;   /* match app font */
    font-weight: 400;       /* same weight for all rows */
    font-size: 13px;        /* same size as other items */
    line-height: 1;
  }

  /* Icons already fixed; keep them tied to text color */
  .more-menu a svg,
  .more-menu a svg * {
    fill: currentColor !important;
    stroke: currentColor !important;
  }

  .bottom-nav .tab,
  .bottom-nav .tab span {
    color: #ffffff !important;
    font-weight: 400;
  }
  .bottom-nav .tab.active,
  .bottom-nav .tab.active span {
    color: #60a5fa !important;  /* your active blue */
  }

  /* Lift page content above bar */
  .main-content{padding-bottom:calc(64px + max(env(safe-area-inset-bottom),8px) + 18px) !important;}
}

/* Ultra-narrow phones: hide labels until active */
@media(max-width:360px){
  .bottom-nav .tab span{display:none;}
  .bottom-nav .tab.active span{display:inline;}
}



