*{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 {height:32px; padding:6px 10px}              /* visual consistency */
select {height:32px; padding:0px 10px}              /* visual consistency */
.button{height:32px;display:inline-flex;align-items:center}

.avatar{
  width:40px;
  height:40px;
  border-radius:999px;
  background:#e5e7eb;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  flex:0 0 auto;
  cursor:pointer;
}

.container{max-width:95%;margin:16px auto;padding:0 16px}
.button{
  background:#fff;
  color:#374151;
  border-radius:6px;
  padding:8px 12px;
  text-decoration:none;
  border:1px solid #cbd5e1;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-weight:700;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}

.button:hover{
  background:#f8fafc;
  border-color:#94a3b8;
}

.button.primary{
  background:#2e7d32;
  color:#fff;
  border-color:#2e7d32;
  box-shadow:0 1px 2px rgba(46,125,50,.18);
}

.button.primary:hover{
  background:#256628;
  border-color:#256628;
}

.button.secondary{
  background:#fff;
  color:#374151;
  border-color:#cbd5e1;
}

.button.secondary:hover{
  background:#f8fafc;
  border-color:#94a3b8;
}

.button.danger{
  background:#fff;
  color:#c62828;
  border-color:#ef9a9a;
}

.button.danger:hover{
  background:#fef2f2;
  border-color:#e57373;
}

.button.other{
  background:transparent;
  color:#7b1fa2;
  border-color:transparent;
  box-shadow:none;
}

.button.other:hover{
  background:#f5f3ff;
  border-color:transparent;
}

.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:6000
}

.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%;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: 6px;
  cursor: pointer;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  background:#fff;
  color:#374151;
  transition:background .15s ease,border-color .15s ease,color .15s ease,box-shadow .15s ease;
}

.btn:hover{
  background:#f8fafc;
  border-color:#94a3b8;
}

.btn.primary,
.btn-primary,
.btn.primary-run{
  background:#2e7d32;
  color:#fff;
  border-color:#2e7d32;
  box-shadow:0 1px 2px rgba(46,125,50,.18);
}

.btn.primary:hover,
.btn-primary:hover,
.btn.primary-run:hover{
  background:#256628;
  border-color:#256628;
}

.btn.secondary,
.btn-ghost{
  background:#fff;
  color:#374151;
  border-color:#cbd5e1;
}

.btn.secondary:hover,
.btn-ghost:hover{
  background:#f8fafc;
  border-color:#94a3b8;
}

.btn.danger,
.btn-danger{
  background:#fff;
  color:#c62828;
  border-color:#ef9a9a;
}

.btn.danger:hover,
.btn-danger:hover{
  background:#fef2f2;
  border-color:#e57373;
}

.btn.other{
  background:transparent;
  color:#7b1fa2;
  border-color:transparent;
  box-shadow:none;
}

.btn.other:hover{
  background:#f5f3ff;
  border-color:transparent;
}

/* 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,
.page-banner .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 *,
.page-banner .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,
.page-banner .banner-loader::before{
  content:none !important;
  display:none !important;
}

/* ==============================
   Global Banner + Loader Standardization
   - equal banner heights
   - loader style parity
   - zero banner height shift while loading
   ============================== */
:root{
  --app-banner-height:56px;
  --app-banner-loader-offset:8px;
}

body > .header,
body > .page-header,
body > .page-banner,
.help-page > .header,
.help-page > .page-header,
.help-page > .page-banner,
.app-banner{
  box-sizing:border-box !important;
  height:var(--app-banner-height) !important;
  min-height:var(--app-banner-height) !important;
  position:relative !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  flex-wrap:nowrap !important;
}

body > .header > .left,
body > .header > .right,
body > .header > .header-right,
body > .page-header > .left,
body > .page-header > .right,
body > .page-header > .header-right,
body > .page-banner > .left,
body > .page-banner > .right,
body > .page-banner > .header-right,
.help-page > .header > .left,
.help-page > .header > .right,
.help-page > .header > .header-right,
.help-page > .page-header > .left,
.help-page > .page-header > .right,
.help-page > .page-header > .header-right,
.help-page > .page-banner > .left,
.help-page > .page-banner > .right,
.help-page > .page-banner > .header-right,
.app-banner > .left,
.app-banner > .right,
.app-banner > .header-right{
  min-width:0 !important;
  flex-wrap:nowrap !important;
}

.app-banner .banner-copy{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  min-width:0 !important;
  gap:2px !important;
}

.app-banner .banner-title{
  font-weight:800 !important;
  font-size:16px !important;
  line-height:1.2 !important;
  margin:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}

.app-banner .banner-sub{
  font-size:12px !important;
  color:#6b7280 !important;
  line-height:1.2 !important;
  margin:0 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  max-width:min(56vw, 760px) !important;
}

.banner-loader{
  position:fixed !important;
  left:0 !important;
  right:0 !important;
  top:var(--app-banner-height) !important;
  z-index:5000 !important;
  height:4px !important;
  margin:0 !important;
  padding:0 !important;
  overflow:hidden !important;
  pointer-events:none !important;
  background: #96d1fb !important;
  border-bottom: 1px solid rgba(255,255,255,.55) !important;
}
.app-shell > .app-menu ~ .app-content .banner-loader{
  left:220px !important;
}
.app-shell > .app-menu.collapsed ~ .app-content .banner-loader{
  left:55px !important;
}
.banner-loader::before{
  display:block !important;
  position:absolute !important;
  content:"" !important;
  left:-30%;
  width:35%;
  height:4px !important;
  background: #1d4ed8 !important;
  will-change: left, width;
  animation: bannerLoading 1.6s ease-in-out infinite !important;
}
.banner-loader > *{ display:none !important; }
@keyframes bannerLoading{
  0% { left:-30%; width:35%; opacity:1; }
  50% { left:30%; width:45%; opacity:1; }
  100% { left:105%; width:35%; opacity:1; }
}
