*{box-sizing:border-box}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,'Helvetica Neue',Arial}
/* keep your existing rules; add/override the ones below */

.header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 16px;
  border-bottom:1px solid #e5e7eb;
  flex-wrap:nowrap;

  /* FIX: allow loader to be absolutely positioned without affecting height */
  position:relative;
  min-height:56px;
}

.header .left,
.header .right,
.header .header-right,
.header .avatarHeader,
.page-banner .left,
.page-banner .right,
.page-banner .header-right,
.page-banner .avatarHeader{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
  min-height:40px;
}

.page-banner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 16px;
  border-bottom:1px solid #e5e7eb;
  flex-wrap:nowrap;
  position:relative;
  min-height:56px;
}

input, select, textarea, button{font:inherit}            /* same font as banner */
input, select{height:32px;padding:6px 10px}              /* visual consistency */
.button{height:32px;display:inline-flex;align-items:center}

.avatar{width:40px;height:40px;border-radius:999px;background:#e5e7eb;flex:0 0 auto}

.container{max-width:95%;margin:16px auto;padding:0 16px}
.button{
  background:#2563eb;
  color:#fff;
  border-radius:8px;
  padding:8px 12px;
  text-decoration:none;
  border:0;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
}

.button:hover{
  background:#1d4ed8;
}

.menu{
  position:absolute;
  right:16px;
  top:56px;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:8px;
  display:none;
  min-width:200px;
  box-shadow:0 10px 20px rgba(0,0,0,.08);
  z-index:10
}

.menu a{display:block;padding:10px 12px;color:#111827;text-decoration:none}
.menu a:hover{background:#f3f4f6}

.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px;margin-top:12px}
.card{border:1px solid #e5e7eb;border-radius:12px;padding:12px;cursor:pointer}

.form label{display:block;margin:8px 0 4px;color:#374151;font-weight:600}
.form input,.form textarea,.form select{width:100%;padding:8px;border:1px solid #e5e7eb;border-radius:8px}
.form .row{display:grid;grid-template-columns:1fr 1fr;gap:12px}

.table{width:100%;border-collapse:collapse;margin-top:8px}
.table th,.table td{border:1px solid #e5e7eb;padding:6px;text-align:left}

.badge{background:#e5e7eb;border-radius:6px;padding:2px 6px;font-size:12px}

.skeleton{position:relative;background:#e5e7eb;border-radius:8px;overflow:hidden}
.shimmer{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.6) 50%, rgba(255,255,255,0) 100%);
  animation:sh 1.2s infinite
}
@keyframes sh{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}

.tabs a{margin-right:8px;text-decoration:none;color:#111827;padding:4px 8px;border-radius:6px;border:1px solid #e5e7eb}
.tabs a.active{background:#2563eb;color:#fff;border-color:#2563eb}

/* Project card look & feel */
.card.project{
  position: relative;
  cursor: pointer;                 /* hand/finger cursor */
  text-decoration: none;           /* no underline anywhere */
}

.card.project .title{
  font-size: 18px;
  font-weight: 700;                /* bigger & bold */
  line-height: 1.25;
  margin-bottom: 6px;
}

.card.project .desc{
  font-size: 13px;                 /* smaller description */
  color: #4b5563;
  display: -webkit-box;            /* 4-line clamp */
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card.project .meta{
  margin-top: 8px;
  font-size: 12px;
  color: #6b7280;                  /* muted */
}

.card.project .footer{
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;   /* separates last line */
  display: flex;
  align-items: center;
  justify-content: space-between;  /* status left, trash right */
  gap: 8px;
  font-size: 12px;
}

.card.project .status{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef2ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 600;
  white-space: nowrap;
}

/* trash button inside tile, bottom-right */
.card.project .trash{
  background: none;
  border: none;
  color: #6b7280;
  font-size: 16px;
  padding: 4px 6px;
  cursor: pointer;
}
.card.project .trash:hover{ color: #111827; }

/* Modal background */
.modal {
  position: fixed;
  top: 120; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
}

/* Hide by default */
.modal.hidden { display: none; }

/* Modal box */
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 320px;
  max-width: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.modal-content h3 { margin-top: 0; }

.actions {
  margin-top: 15px;
  display: flex;
  justify-content: space-around;
}

.btn {
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  border: none;
}

.btn.secondary { background: #e5e7eb; color: #374151; }
.btn.secondary:hover { background: #d1d5db; }

.btn.danger { background: #ef4444; color: #fff; }
.btn.danger:hover { background: #dc2626; }

/* ensure hidden always hides regardless of other rules */
[hidden] { display: none !important; }

/* Full-screen boot loader shown after login while app data preloads */
.boot-loader{
  position:fixed;
  inset:0;
  background:rgba(249,250,251,0.96);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}

.boot-loader.visible{
  opacity:1;
  pointer-events:auto;
}

.boot-loader-card{
  background:#ffffff;
  border-radius:16px;
  padding:24px 28px 20px;
  box-shadow:0 20px 40px rgba(15,23,42,0.18);
  max-width:420px;
  width:90%;
}

.boot-loader-title{
  font-size:18px;
  font-weight:600;
  color:#111827;
  margin-bottom:8px;
}

.boot-loader-message{
  font-size:14px;
  color:#4b5563;
  min-height:40px;
  display:flex;
  align-items:flex-start;
}

.boot-loader-progress{
  margin-top:16px;
  width:100%;
  height:6px;
  border-radius:999px;
  background:#e5e7eb;
  overflow:hidden;
}

.boot-loader-bar{
  height:100%;
  width:12%;
  border-radius:999px;
  background:#2563eb;
  transition:width .25s ease-out;
}

#sort {
  height: 32px;
  padding: 6px 10px;
}

/* ==============================
   FIX: banner-loader shouldn't change header height
   ============================== */
.header .banner-loader,
.page-header .banner-loader{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:3px;
  margin:0 !important;
  pointer-events:none;
}

.header .banner-loader *,
.page-header .banner-loader *{
  display:block;
  margin:0 !important;
}

.search-wrap{
  position: relative;
  display: inline-block;
}

.search-wrap .search-ico{
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: .65;
  pointer-events: none;
}

.search-wrap input{
  padding-left: 32px;          /* room for icon */
  height: 34px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  outline: none;
}

.search-wrap input:focus{
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}


.crumb-link{
  color:#2563eb;
  text-decoration:none;
  font-weight:600;
}
.crumb-link:hover{ text-decoration:underline; }
.crumb-sep{ color:#9ca3af; margin:0 6px; }
.crumb-current{ color:#111827; font-weight:700; }

.header .banner-loader::before,
.page-header .banner-loader::before{
  content:none !important;
  display:none !important;
}
