/* =========================================================
   ARCHLENZ360 PORTAL
   Portal-specific layout only
========================================================= */

#app{
display:flex;
flex-direction:column;
min-height:100vh;
}

/* =========================================================
   Portal unified workspace
========================================================= */

.portal-page-content{
display:flex;
flex-direction:column;
gap:0;
padding-bottom:8px;
}

.portal-page-content .gallery-hero{
margin-top:28px;
padding:0;
}

.portal-page-content .gallery-breadcrumbs{
margin:0 0 16px;
}

.portal-page-content > .section-title{
margin:32px 0 0;
}

.system-row{
display:grid;
grid-template-columns:repeat(6,minmax(0,1fr));
gap:0;
align-items:stretch;
font-size:14px;
color:var(--text-secondary);
}

.system-row .metric,
.system-row .metric.metric--date{
position:relative;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
text-align:center;
min-width:0;
min-height:96px;
padding:15px 16px;
}

.system-row .metric:not(:last-child)::after{
content:"";
position:absolute;
right:0;
top:50%;
width:1px;
height:44px;
background:var(--border-color);
opacity:.58;
transform:translateY(-50%);
}

.featured-card,
.featured-card:visited,
.featured-card:hover,
.featured-card:active,
.featured-card:focus{
height:clamp(260px,24vw,390px);
border-radius:22px;
text-decoration:none;
color:#fff;
}

.featured-card .featured-title,
.featured-card .featured-location,
.featured-card .featured-action{
color:inherit;
text-decoration:none;
}

.featured-overlay{
background:linear-gradient(0deg,rgba(0,0,0,.78) 0%,rgba(0,0,0,.44) 42%,rgba(0,0,0,.08) 76%);
}

.featured-content{
width:min(720px,100%);
padding:clamp(24px,3vw,40px);
}

.featured-card:focus-visible,
.recent-item:focus-visible,
.portal-project-grid .card:focus-visible,
.project-list-row:focus-visible{
outline:3px solid color-mix(in srgb,var(--text-primary) 24%,transparent);
outline-offset:3px;
}

.recent-captures{
width:100%;
max-width:none;
margin-top:32px;
margin-bottom:32px;
}

.recent-captures .section-title{
margin:0 0 14px;
}

.recent-row{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
gap:16px;
width:100%;
padding:0;
overflow:visible;
}

.recent-item{
appearance:none;
width:auto;
min-width:0;
display:flex;
flex-direction:column;
padding:0;
border:1px solid var(--border-color);
border-radius:16px;
background:var(--card-bg);
color:var(--text-primary);
font:inherit;
text-align:left;
box-shadow:0 8px 24px rgba(15,23,42,.05);
overflow:hidden;
cursor:pointer;
transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

.recent-thumb{
width:100%;
height:auto;
aspect-ratio:16/10;
border-radius:0;
}

.recent-thumb img{
display:block;
width:100%;
height:100%;
object-fit:cover;
transition:transform .2s ease;
}

.recent-meta{
display:flex;
flex-direction:column;
gap:5px;
min-width:0;
padding:11px 12px 12px;
font-size:12px;
}

.recent-project-name{
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
overflow:hidden;
font-size:13px;
font-weight:700;
line-height:1.3;
color:var(--text-primary);
}

.recent-visit-date{
color:var(--text-secondary);
font-size:12px;
line-height:1.35;
overflow-wrap:normal;
}

.portal-empty-state{
display:flex;
align-items:center;
justify-content:center;
min-height:92px;
padding:20px;
border:1px dashed var(--border-color);
border-radius:16px;
background:var(--surface-soft);
color:var(--text-secondary);
font-size:14px;
text-align:center;
}

.portal-projects-section{
display:flex;
flex-direction:column;
gap:0;
margin:0;
}

.projects-section-header{
display:flex;
align-items:center;
justify-content:space-between;
gap:20px;
margin-bottom:22px;
}

.projects-heading-group{
display:flex;
align-items:baseline;
gap:10px;
min-width:0;
}

.projects-heading-group .section-title{
margin:0;
font-size:clamp(18px,1.35vw,22px);
}

.projects-heading-group .projects-toolbar-results{
white-space:nowrap;
}

.projects-toolbar{
margin:0;
}

.portal-project-grid{
display:grid;
grid-template-columns:repeat(4,minmax(0,1fr));
align-items:start;
gap:24px;
}

.portal-project-grid.is-list{
display:flex;
flex-direction:column;
width:100%;
max-width:none;
min-width:0;
gap:18px;
}

.portal-project-grid .card{
display:flex;
flex-direction:column;
min-width:0;
height:auto;
min-height:0;
align-self:start;
padding:0;
overflow:hidden;
border:1px solid var(--border-color);
box-shadow:0 8px 24px rgba(15,23,42,.05);
}

.portal-project-grid .project-card-media{
position:relative;
height:auto;
aspect-ratio:16/9;
overflow:hidden;
background-size:cover;
background-position:center;
transition:transform .18s ease;
}

.portal-project-grid .project-card-media > .badge-hero{
top:12px;
left:12px;
}

.project-list-deliverables{
display:flex;
flex-wrap:wrap;
gap:5px;
margin-top:7px;
}

.project-list-deliverables .deliverable-pill{
padding:3px 8px;
font-size:9px;
}

.project-card-content{
display:grid;
grid-template-columns:minmax(0,1fr) auto;
align-items:end;
gap:14px;
min-width:0;
padding:16px;
}

.project-card-info{
display:flex;
flex-direction:column;
min-width:0;
gap:5px;
}

.project-card-info .card-meta{
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.project-card-action-area{
display:flex;
align-items:flex-end;
justify-content:flex-end;
min-width:0;
}

.portal-project-grid .card-title{
display:-webkit-box;
-webkit-box-orient:vertical;
-webkit-line-clamp:2;
overflow:hidden;
font-size:18px;
line-height:1.25;
}

.portal-body .portal-project-action{
display:inline-flex;
align-items:center;
justify-content:center;
width:max-content;
min-height:38px;
padding:0 15px;
border:1px solid #111;
border-radius:999px;
background:#111;
color:#fff;
opacity:1;
font-size:12px;
font-weight:750;
line-height:1;
letter-spacing:0;
text-transform:none;
white-space:nowrap;
cursor:pointer;
font-family:inherit;
box-shadow:none;
transform:none;
margin:0;
}

[data-theme="dark"] .portal-body .portal-project-action{
background:#fff;
color:#111;
border-color:#fff;
opacity:1;
}

.portal-body .portal-project-action:focus-visible{
outline:none;
box-shadow:0 0 0 3px rgba(17,17,17,.16);
}

[data-theme="dark"] .portal-body .portal-project-action:focus-visible{
box-shadow:0 0 0 3px rgba(255,255,255,.18);
}

.empty{
grid-column:1/-1;
}

@media (hover:hover) and (pointer:fine){
  .featured-card:hover,
  .recent-item:hover,
  .portal-project-grid .card:hover,
  .project-list-row:hover{
  transform:translateY(-1px);
  border-color:color-mix(in srgb,var(--text-primary) 18%,var(--border-color));
  }

  .featured-card:hover .featured-thumbnail,
  .recent-item:hover .recent-thumb img,
  .portal-project-grid .card:hover .project-card-media{
  transform:scale(1.01);
  }

  .portal-body .portal-project-action:hover{
  background:#111;
  color:#fff;
  border-color:#111;
  transform:translateY(-1px);
  }

  [data-theme="dark"] .portal-body .portal-project-action:hover{
  background:#fff;
  color:#111;
  border-color:#fff;
  }
}

@media (max-width:1439px){
  .recent-row{
  grid-template-columns:repeat(4,minmax(0,1fr));
  }

  .recent-item:nth-child(n+5){
  display:none;
  }

}

@media (max-width:1179px){
  .portal-project-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .portal-project-grid .card-title{
  font-size:16px;
  }
}

@media (max-width:1199px){
  .system-row{
  grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .system-row .metric:not(:last-child)::after{
  display:block;
  }

  .system-row .metric:nth-child(3n)::after{
  display:none;
  }
}

@media (max-width:1023px){
  .recent-row{
  grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .recent-item:nth-child(n+4){
  display:none;
  }

  .projects-section-header{
  align-items:flex-start;
  flex-direction:column;
  gap:14px;
  margin-bottom:20px;
  }

  .projects-toolbar,
  .projects-toolbar-controls{
  width:100%;
  justify-content:flex-start;
  }
}

@media (max-width:899px){
  .portal-project-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .project-card-content{
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  }

  .project-card-action-area{
  justify-content:flex-start;
  }
}

@media (max-width:768px){
  .portal-page-content{
  gap:0;
  }

  .section-title{
  font-size:17px;
  }

  .portal-page-content > .section-title{
  margin-top:28px;
  }

  #featuredProject{
  margin-top:10px;
  }

  .recent-captures{
  margin-top:28px;
  margin-bottom:28px;
  }

  .system-row{
  grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .system-row .metric:not(:last-child)::after{
  display:block;
  }

  .system-row .metric:nth-child(3n)::after{
  display:block;
  }

  .system-row .metric:nth-child(2n)::after{
  display:none;
  }

  .recent-row{
  display:flex;
  gap:12px;
  padding:0 0 8px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scrollbar-width:none;
  }

  .recent-row::-webkit-scrollbar{
  display:none;
  }

  .recent-item,
  .recent-item:nth-child(n){
  display:flex;
  flex:0 0 min(78vw,300px);
  scroll-snap-align:start;
  }

  .projects-heading-group{
  width:100%;
  align-items:baseline;
  }

  .projects-section-header{
  align-items:stretch;
  flex-direction:column;
  gap:12px;
  margin-bottom:20px;
  }

  .projects-toolbar-controls{
  flex-direction:column;
  align-items:stretch;
  }

}

@media (max-width:639px){
  .portal-project-grid{
  grid-template-columns:1fr;
  }
}

@media (prefers-reduced-motion:reduce){
  .featured-card,
  .featured-thumbnail,
  .recent-item,
  .recent-thumb img,
  .portal-project-grid .card,
  .portal-project-grid .project-card-media,
  .project-list-row{
  transition:none;
  }
}

/* Portal page spacing tweaks */

.portal-version{
font-size:11px;
color:var(--text-secondary);
margin-left:10px;
letter-spacing:.5px;
}

.portal-page{
min-height:100vh;
display:flex;
flex-direction:column;
}

.systembar-wrapper{
width:100%;
}

/* Optional portal hero spacing */

.featured-project{
margin-top:10px;
}

.chevron{
font-size:14px;
margin-left:6px;
opacity:.65;
transition:transform .15s ease;
}

.user-dropdown.open .chevron{
transform:rotate(180deg);
}

/* Portal-only animation tweaks */

.card{
animation-duration:.35s;
}

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


.section-title{
margin:0;
color:var(--text-primary);
font-size:clamp(16px,1.2vw,20px);
line-height:1.2;
font-weight:800;
letter-spacing:-.015em;
text-transform:none;
}

.section-title::after{
content:none;
display:none;
}

.system-bar{
flex:0 0 auto;
width:100%;
margin:0;
background:var(--card-bg);
border:1px solid var(--border-color);
border-radius:22px;
padding:0;
box-shadow:0 18px 36px rgba(15,23,42,.05);
overflow:hidden;
}
/* =================================
   Recent Captures Strip
================================= */

.recent-title{
font-size:11px;
letter-spacing:1.4px;
text-transform:uppercase;
color:var(--brand-gold);
margin-bottom:12px;
}

/* ============================
   Portal Project Grid
============================ */

.projects-toolbar{
display:flex;
align-items:flex-end;
justify-content:space-between;
gap:20px 24px;
flex-wrap:wrap;
margin:0;
}

.projects-toolbar-copy{
display:flex;
flex-direction:column;
gap:6px;
}

.projects-toolbar-results{
margin:0;
color:var(--text-secondary);
font-size:13px;
font-weight:600;
}

.projects-toolbar-controls{
display:flex;
align-items:center;
justify-content:flex-end;
gap:12px;
flex-wrap:wrap;
}

.projects-control{
display:inline-flex;
align-items:center;
gap:10px;
min-height:48px;
padding:0 14px;
border-radius:999px;
border:1px solid var(--border-color);
background:var(--card-bg);
box-shadow:0 14px 30px rgba(15,23,42,.05);
color:var(--text-primary);
}

.projects-control-icon{
width:16px;
height:16px;
display:inline-block;
flex-shrink:0;
background-color:currentColor;
mask-repeat:no-repeat;
mask-position:center;
mask-size:contain;
-webkit-mask-repeat:no-repeat;
-webkit-mask-position:center;
-webkit-mask-size:contain;
}

.projects-control-icon--sort{
mask-image:url("/assets/icons/ui/arrow-down-up.svg");
-webkit-mask-image:url("/assets/icons/ui/arrow-down-up.svg");
}

.projects-control-icon--filter{
mask-image:url("/assets/icons/ui/list-filter.svg");
-webkit-mask-image:url("/assets/icons/ui/list-filter.svg");
}

.projects-control-icon--grid{
mask-image:url("/assets/icons/ui/layout-grid.svg");
-webkit-mask-image:url("/assets/icons/ui/layout-grid.svg");
}

.projects-control-icon--list{
mask-image:url("/assets/icons/ui/list.svg");
-webkit-mask-image:url("/assets/icons/ui/list.svg");
}

.projects-control-label{
font-size:11px;
font-weight:700;
letter-spacing:.08em;
text-transform:uppercase;
color:var(--text-secondary);
white-space:nowrap;
}

.projects-control select{
border:none;
outline:none;
background:transparent;
color:var(--text-primary);
font:inherit;
font-size:14px;
font-weight:600;
min-height:40px;
padding-right:4px;
cursor:pointer;
}

.projects-view-toggle{
display:inline-flex;
align-items:center;
gap:4px;
padding:4px;
border-radius:999px;
border:1px solid var(--border-color);
background:var(--card-bg);
box-shadow:0 14px 30px rgba(15,23,42,.05);
}

.projects-view-btn{
appearance:none;
border:none;
background:transparent;
display:inline-flex;
align-items:center;
gap:7px;
color:var(--text-secondary);
border-radius:999px;
padding:10px 16px;
font:inherit;
font-size:14px;
font-weight:600;
cursor:pointer;
transition:background .18s ease,color .18s ease,box-shadow .18s ease;
}

.projects-view-btn:hover{
color:var(--text-primary);
}

.projects-view-btn.active{
background:var(--accent);
color:#fff;
box-shadow:0 10px 22px rgba(15,23,42,.16);
}

.project-list-row{
display:grid;
grid-template-columns:auto minmax(220px,1.5fr) minmax(120px,.65fr) minmax(150px,.75fr) auto;
align-items:center;
gap:24px;
width:100%;
max-width:none;
min-width:0;
box-sizing:border-box;
padding:14px 18px 14px 14px;
border:1px solid var(--border-color);
border-radius:22px;
background:var(--card-bg);
box-shadow:0 8px 24px rgba(0,0,0,.05);
cursor:pointer;
opacity:0;
transform:translateY(10px);
animation:fadeIn .4s ease forwards;
animation-delay:calc(var(--card-index) * 30ms);
transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.project-list-row:hover{
transform:translateY(-2px);
box-shadow:0 18px 34px rgba(15,23,42,.09);
}

.project-list-thumb{
width:112px;
height:84px;
border-radius:16px;
background-size:cover;
background-position:center;
background-repeat:no-repeat;
}

.project-list-primary{
min-width:0;
display:flex;
flex-direction:column;
gap:6px;
}

.project-list-title{
font-size:18px;
font-weight:700;
letter-spacing:-.03em;
color:var(--text-primary);
}

.project-list-location,
.project-list-value{
font-size:14px;
color:var(--text-secondary);
}

.project-list-meta{
display:flex;
flex-direction:column;
gap:6px;
min-width:0;
}

.project-list-label{
font-size:11px;
font-weight:700;
letter-spacing:.08em;
text-transform:uppercase;
color:var(--text-secondary);
}

.project-list-status{
display:inline-flex;
align-items:center;
justify-content:center;
min-height:32px;
padding:0 12px;
border-radius:999px;
background:var(--surface-soft);
border:1px solid transparent;
font-size:13px;
font-weight:700;
color:var(--text-primary);
width:max-content;
max-width:100%;
}

.project-list-status.active-status{
background:var(--status-active-bg);
border-color:var(--status-active-border);
color:var(--status-active-text);
}

.project-list-status.upcoming-status{
background:var(--status-upcoming-bg);
border-color:var(--status-upcoming-border);
color:var(--status-upcoming-text);
}

.project-list-status.completed-status{
background:var(--status-completed-bg);
border-color:var(--status-completed-border);
color:var(--status-completed-text);
}

.project-list-row:hover .project-list-status.active-status{
background:var(--status-active-bg-hover);
border-color:var(--status-active-border-hover);
}

.project-list-row:hover .project-list-status.upcoming-status{
background:var(--status-upcoming-bg-hover);
border-color:var(--status-upcoming-border-hover);
}

.project-list-row:hover .project-list-status.completed-status{
background:var(--status-completed-bg-hover);
border-color:var(--status-completed-border-hover);
}

.project-list-action{
display:inline-flex;
align-items:center;
justify-content:center;
justify-self:end;
align-self:center;
width:max-content;
min-height:44px;
margin:0;
padding:0 18px;
border-radius:999px;
border:1px solid #111;
background:#111;
font-size:14px;
font-weight:700;
color:#fff;
opacity:1;
white-space:nowrap;
}

[data-theme="dark"] .project-list-action{
background:#fff;
color:#111;
border-color:#fff;
opacity:1;
}

.project-list-row:hover .project-list-action{
border-color:#111;
box-shadow:0 10px 22px rgba(15,23,42,.06);
}

[data-theme="dark"] .project-list-row:hover .project-list-action{
background:#fff;
color:#111;
border-color:#fff;
}

.empty{
padding:28px 24px;
border-radius:22px;
border:1px dashed var(--border-color);
background:var(--card-bg);
color:var(--text-secondary);
text-align:center;
}

/* =================================
   Portal Footer
================================= */

.portal-footer{
width:100%;
margin-top:40px;
padding:8px 0;
min-height:64px;
font-size:12px;
background:transparent;
}

.portal-footer-inner{
width:min(
calc(100% - (var(--portal-page-gutter) * 2)),
var(--portal-workspace-max)
);
margin-inline:auto;
min-width:0;
padding:8px 20px;
display:grid;
grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
align-items:center;
gap:24px;
min-height:64px;
border-radius:14px;
border:1px solid var(--border-color);
background:var(--card-bg);
box-shadow:0 8px 24px rgba(0,0,0,0.05);
}

.portal-footer-left{
display:flex;
align-items:center;
gap:10px;
min-width:0;
justify-self:start;
color:var(--text-secondary);
line-height:1.4;
white-space:nowrap;
}

.portal-footer-left .footer-separator{
color:var(--text-muted, var(--text-secondary));
opacity:.72;
line-height:1;
}

.portal-footer-right{
display:flex;
align-items:center;
justify-content:center;
gap:6px;
justify-self:center;
}

.portal-footer-inner .powered-by{
justify-self:end;
margin-left:0;
}

@media (max-width:768px){
.portal-footer,
.portal-footer-inner{
min-height:58px;
}

.portal-footer-inner{
grid-template-columns:1fr;
justify-items:start;
gap:12px;
}

.portal-footer-right{
justify-content:flex-start;
justify-self:start;
flex-wrap:wrap;
}

.portal-footer-left{
flex-wrap:wrap;
gap:8px;
white-space:normal;
}

.portal-footer-inner .powered-by{
justify-self:start;
margin-left:0;
}
}

footer a,
.footer a,
.site-footer a,
.footer-meta a{
color:var(--text-secondary);
text-decoration:none;
transition:color .16s ease, opacity .16s ease;
}

footer a:hover,
.footer a:hover,
.site-footer a:hover,
.footer-meta a:hover,
footer a:focus-visible,
.footer a:focus-visible,
.site-footer a:focus-visible,
.footer-meta a:focus-visible{
color:var(--text-primary);
opacity:1;
}

[data-theme="dark"] footer a,
[data-theme="dark"] .footer a,
[data-theme="dark"] .site-footer a,
[data-theme="dark"] .footer-meta a{
color:rgba(255,255,255,.72);
}

[data-theme="dark"] footer a:hover,
[data-theme="dark"] .footer a:hover,
[data-theme="dark"] .site-footer a:hover,
[data-theme="dark"] .footer-meta a:hover,
[data-theme="dark"] footer a:focus-visible,
[data-theme="dark"] .footer a:focus-visible,
[data-theme="dark"] .site-footer a:focus-visible,
[data-theme="dark"] .footer-meta a:focus-visible{
color:rgba(255,255,255,.96);
opacity:1;
}

.footer-link{
background:none;
border:none;
padding:0;
margin:0;
font:inherit;
color:inherit;
cursor:pointer;
text-decoration:none;
}

.metric-label{
font-size:11px;
font-weight:700;
letter-spacing:.08em;
text-transform:uppercase;
color:var(--text-secondary);
margin-bottom:7px;
}

.metric-value{
font-size:21px;
font-weight:700;
letter-spacing:-.04em;
color:var(--text-primary);
}

[data-theme="dark"] .projects-control,
[data-theme="dark"] .projects-view-toggle{
background:#1A1D21;
border-color:#2A2F36;
box-shadow:none;
}

[data-theme="dark"] .projects-view-btn.active{
background:#111111;
color:#ffffff;
box-shadow:0 10px 22px rgba(0,0,0,.34);
}

[data-theme="dark"] .project-list-row{
box-shadow:0 10px 28px rgba(0,0,0,.6);
}

[data-theme="dark"] .project-list-row:hover{
box-shadow:0 25px 60px rgba(0,0,0,.72);
}

/* =========================
   TERMS MODAL
========================= */

.terms-modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.55);
backdrop-filter:blur(6px);

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

z-index:9999;
}

.terms-card{
background:#ffffff;
border-radius:14px;
padding:28px 32px;
width:420px;
max-width:90%;

box-shadow:
0 20px 45px rgba(0,0,0,.35),
0 6px 18px rgba(0,0,0,.15);

text-align:center;
}

.terms-card h2{
color:#111;
font-weight:700;
margin-bottom:10px;
}

.terms-card p{
color:#444;
font-size:14px;
line-height:1.6;
margin-bottom:18px;
}

.terms-links a{
color:#6b7280;
text-decoration:none;
display:block;
margin:6px 0;
font-weight:500;
}

.terms-links a:hover{
color:#111;
}

/* Custom checkbox styling */

.terms-checkbox input[type="checkbox"]{
appearance:none;
-webkit-appearance:none;
width:18px;
height:18px;
border:2px solid #111;
border-radius:4px;
cursor:pointer;
position:relative;
}

.terms-checkbox{
display:flex;
align-items:flex-start;
gap:10px;
justify-content:center;
margin-top:16px;
max-width:320px;
margin-left:auto;
margin-right:auto;
font-size:15px;
color:#444;
line-height:1.4;
text-align:left;
}

.terms-checkbox input[type="checkbox"]:checked{
background:#111;
border-color:#111;
}

.terms-checkbox input[type="checkbox"]:checked::after{
content:"✔";
color:#fff;
font-size:12px;
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-55%);
}

#acceptTermsBtn{
background:#111;
color:#fff;
border:none;
padding:12px 22px;
border-radius:8px;
font-weight:600;
cursor:pointer;
transition:all .2s ease;
margin-top:20px;
}

#acceptTermsBtn:hover{
background:#000;
}

#acceptTermsBtn:disabled{
background:#555;
color:#ccc;
cursor:not-allowed;
}

/* ===============================
   Session Timeout Modal
================================ */

.session-modal{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.45);
display:flex;
align-items:center;
justify-content:center;
z-index:9999;
}

.session-card{
background:#fff;
padding:32px;
border-radius:14px;
width:360px;
text-align:center;
box-shadow:0 30px 60px rgba(0,0,0,.25);
}

.session-card h2{
margin-bottom:10px;
}

.session-actions{
margin-top:20px;
display:flex;
gap:10px;
justify-content:center;
}

.session-actions button{
padding:8px 14px;
border-radius:8px;
border:none;
cursor:pointer;
font-weight:600;
}

#stayLoggedInBtn{
background:#000;
color:#fff;
}

#signOutBtn{
background:#e5e7eb;
}

@media (max-width: 1199px){

  .project-list-row{
    grid-template-columns:96px minmax(0,1fr) auto;
    grid-template-areas:
      "thumb primary action"
      "thumb status action"
      "thumb date action";
    gap:10px 18px;
  }

  .project-list-thumb{
    grid-area:thumb;
    width:96px;
  }

  .project-list-primary{
    grid-area:primary;
  }

  .project-list-status-meta{
    grid-area:status;
  }

  .project-list-date-meta{
    grid-area:date;
  }

  .project-list-action{
    grid-area:action;
    justify-self:end;
    align-self:center;
  }
}

@media (max-width: 780px){
  .projects-toolbar-controls{
    width:100%;
    justify-content:flex-start;
  }

  .projects-control{
    flex:1 1 220px;
    justify-content:space-between;
  }

  .projects-view-toggle{
    width:100%;
    justify-content:space-between;
  }

  .projects-view-btn{
    flex:1 1 50%;
  }

  .project-list-row{
    grid-template-columns:88px minmax(0,1fr);
    grid-template-areas:
      "thumb primary"
      "status status"
      "date date"
      "action action";
    gap:16px;
  }

  .project-list-action{
    justify-self:start;
  }

  .featured-content{
    padding:24px 22px;
  }

  .featured-title{
    font-size:24px;
  }
}

@media (max-width: 640px){
  .portal-body .nav{
    margin-top:16px;
  }

  .portal-body .nav-inner{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    overflow:visible;
  }

  .portal-body .nav-controls{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
  }

  .portal-body .nav-logo{
    min-width:0;
    gap:8px;
  }

  .portal-body .nav-logo img{
    height:46px;
  }


  .portal-body .nav-user{
    min-width:0;
    flex:0 0 auto;
  }

  .portal-body .user-trigger{
    font-size:13px;
    gap:4px;
    max-width:100%;
  }

  .portal-body .user-trigger-desktop{
    display:none;
  }

  .portal-body .user-trigger-mobile{
    display:inline;
  }

  .portal-body .dropdown-menu{
    width:min(220px, calc(100vw - 24px));
  }

  .metric-label{
    font-size:10px;
    letter-spacing:.07em;
  }

  .metric-value{
    font-size:18px;
  }

  .featured-project{
    margin-top:10px;
  }

  .featured-content{
    padding:18px 18px 16px;
  }

  .featured-title{
    font-size:21px;
    margin-bottom:4px;
  }

  .featured-location{
    font-size:13px;
    margin-bottom:8px;
  }

  .featured-action{
    font-size:11px;
  }

  .projects-toolbar{
    gap:14px;
  }

  .projects-toolbar-copy{
    width:100%;
  }

  .projects-toolbar-results{
    font-size:13px;
  }

  .projects-toolbar-controls{
    gap:10px;
  }

}

@media (max-width: 520px){
  .portal-body .nav-inner{
    padding:12px 14px;
  }

  .portal-body .nav-logo img{
    height:42px;
  }

  .projects-control{
    flex:1 1 100%;
  }

  .projects-view-toggle{
    width:100%;
  }
}

.project-tools-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border:1px solid rgba(148,163,184,.24);
  border-radius:999px;
  background:rgba(15,23,42,.92);
  color:#ffffff;
  font-size:13px;
  font-weight:800;
  letter-spacing:0;
  white-space:nowrap;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(15,23,42,.14);
  transition:transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.project-tools-enabled .project-switcher{
  display:none !important;
}

.project-tools-enabled .nav-user .dropdown-menu{
  display:none !important;
}

.project-tools-enabled .nav-user .chevron{
  display:none !important;
}

.project-tools-user-trigger{
  cursor:pointer;
  border-radius:999px;
}

.project-tools-user-trigger .user-trigger{
  gap:9px;
  cursor:pointer;
  opacity:1;
  background:transparent !important;
  color:var(--text-primary, #111827);
  transition:color .16s ease;
}

.project-tools-user-trigger:hover .user-trigger{
  opacity:1;
  background:transparent !important;
  border-color:transparent;
  color:var(--text-primary, #111827);
  box-shadow:none;
  outline:none;
}

.project-tools-user-trigger:focus-visible .user-trigger,
.project-tools-user-trigger .user-trigger:focus-visible{
  opacity:1;
  background:transparent !important;
  border-color:transparent;
  color:var(--text-primary, #111827);
  box-shadow:none;
  outline:2px solid rgba(0,0,0,.18);
  outline-offset:4px;
}

[data-theme="dark"] .project-tools-user-trigger .user-trigger{
  color:var(--text-primary, #f8fafc);
}

[data-theme="dark"] .project-tools-user-trigger:hover .user-trigger,
[data-theme="dark"] .project-tools-user-trigger:focus-visible .user-trigger,
[data-theme="dark"] .project-tools-user-trigger .user-trigger:focus-visible{
  background:transparent !important;
  border-color:transparent;
  color:var(--text-primary, #f8fafc);
  box-shadow:none;
}

[data-theme="dark"] .project-tools-user-trigger:focus-visible .user-trigger,
[data-theme="dark"] .project-tools-user-trigger .user-trigger:focus-visible{
  outline-color:rgba(255,255,255,.28);
}

.project-tools-trigger-menu{
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:inline-grid;
  align-content:center;
  gap:3px;
  color:currentColor;
  opacity:.58;
  transition:opacity .16s ease, transform .16s ease;
}

.project-tools-trigger-menu span{
  display:block;
  width:16px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  transform-origin:center;
  transition:transform .18s ease, opacity .18s ease;
}

.project-tools-user-trigger:hover .project-tools-trigger-menu,
.project-tools-user-trigger:focus-visible .project-tools-trigger-menu,
.project-tools-user-trigger .user-trigger:focus-visible .project-tools-trigger-menu{
  opacity:.95;
  transform:translateX(1px) scale(1.04);
}

.project-tools-user-trigger[aria-expanded="true"] .project-tools-trigger-menu{
  opacity:1;
  transform:none;
}

.project-tools-user-trigger[aria-expanded="true"] .project-tools-trigger-menu span:nth-child(1){
  transform:translateY(5px) rotate(45deg);
}

.project-tools-user-trigger[aria-expanded="true"] .project-tools-trigger-menu span:nth-child(2){
  opacity:0;
}

.project-tools-user-trigger[aria-expanded="true"] .project-tools-trigger-menu span:nth-child(3){
  transform:translateY(-5px) rotate(-45deg);
}

.project-tools-button:hover,
.project-tools-button:focus-visible{
  transform:translateY(-1px);
  border-color:rgba(148,163,184,.42);
  background:#020617;
  box-shadow:0 16px 30px rgba(15,23,42,.18);
  outline:none;
}

.project-tools-backdrop{
  position:fixed;
  inset:0;
  z-index:8990;
  border:0;
  padding:0;
  background:rgba(0,0,0,.46);
  opacity:0;
  cursor:pointer;
  backdrop-filter:blur(3px);
  transition:opacity .18s cubic-bezier(.22,1,.36,1);
}

.project-tools-backdrop[hidden],
.project-tools-drawer[hidden]{
  display:none !important;
}

.project-tools-backdrop.is-open{
  opacity:1;
}

.project-tools-drawer{
  --project-tools-panel-bg:var(--card-bg, #ffffff);
  --project-tools-panel-border:var(--border-color, #e5e7eb);
  --project-tools-text:var(--text-primary, #111827);
  --project-tools-muted:var(--text-secondary, #64748b);
  --project-tools-soft:var(--surface-soft, #f8fafc);
  --project-tools-control-bg:#ffffff;
  --project-tools-control-hover:#f8fafc;
  --project-tools-hover-bg:rgba(15,23,42,.045);
  --project-tools-shadow:-22px 0 48px rgba(15,23,42,.16);
  position:fixed;
  inset:14px 14px auto auto;
  z-index:9000;
  width:min(400px, calc(100vw - 28px));
  height:auto;
  max-height:calc(100dvh - 28px);
  padding:0;
  pointer-events:none;
  opacity:0;
  transform:translateX(14px);
  transition:
    opacity .2s cubic-bezier(.22,1,.36,1),
    transform .2s cubic-bezier(.22,1,.36,1);
}

[data-theme="dark"] .project-tools-drawer{
  --project-tools-panel-bg:var(--card-bg, #111827);
  --project-tools-panel-border:var(--border-color, rgba(255,255,255,.1));
  --project-tools-text:var(--text-primary, #f8fafc);
  --project-tools-muted:var(--text-secondary, #94a3b8);
  --project-tools-soft:rgba(255,255,255,.04);
  --project-tools-control-bg:rgba(255,255,255,.045);
  --project-tools-control-hover:rgba(255,255,255,.08);
  --project-tools-hover-bg:rgba(255,255,255,.065);
  --project-tools-shadow:-22px 0 48px rgba(0,0,0,.4);
}

.project-tools-drawer.is-open{
  pointer-events:auto;
  opacity:1;
  transform:translateX(0);
}

.project-tools-panel{
  max-height:calc(100dvh - 28px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
  cursor:default;
  border:1px solid var(--project-tools-panel-border);
  border-radius:20px;
  background:var(--project-tools-panel-bg);
  color:var(--project-tools-text);
  box-shadow:var(--project-tools-shadow);
}

[data-theme="dark"] .project-tools-panel{
  box-shadow:var(--project-tools-shadow);
}

.project-tools-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 18px 16px;
  border-bottom:1px solid var(--project-tools-panel-border);
}

.project-tools-head-title{
  min-width:0;
  flex:1 1 auto;
}

.project-tools-head-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex:0 0 auto;
  min-width:0;
}

.project-tools-close{
  width:36px;
  height:36px;
  flex:0 0 36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(15,23,42,.08);
  border-radius:12px;
  background:rgba(255,255,255,.7);
  color:var(--project-tools-text);
  font:inherit;
  font-size:17px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
  transition:background .16s ease, color .16s ease, box-shadow .16s ease;
}

.project-tools-close:hover,
.project-tools-close:focus-visible{
  background:var(--project-tools-control-hover);
  color:var(--project-tools-text);
  outline:none;
}

.project-tools-close:focus-visible{
  box-shadow:0 0 0 3px rgba(15,23,42,.06);
}

[data-theme="dark"] .project-tools-close:focus-visible{
  box-shadow:0 0 0 3px rgba(255,255,255,.06);
}

[data-theme="dark"] .project-tools-close{
  border-color:rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);
}

.project-tools-eyebrow{
  color:var(--project-tools-muted);
  font-size:11px;
  font-weight:850;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.project-tools-title{
  margin:0;
  color:var(--project-tools-text);
  font-size:22px;
  font-weight:850;
  letter-spacing:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.project-tools-subtitle{
  margin:4px 0 0;
  color:var(--project-tools-muted);
  font-size:13px;
  font-weight:560;
  line-height:1.35;
}

.project-tools-body{
  display:grid;
  gap:12px;
  min-height:0;
  padding:16px 16px 24px;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}

.project-tools-section{
  position:relative;
  display:grid;
  gap:2px;
  min-width:0;
  padding:2px 0;
}

.project-tools-switcher + .project-tools-section{
  margin-top:4px;
}

.project-tools-section--secondary{
  margin-top:6px;
}

.project-tools-identity{
  min-width:0;
}

.project-tools-user-card{
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  min-width:0;
  min-height:90px;
  padding:14px;
  border:1px solid var(--project-tools-panel-border);
  border-left:1px solid var(--project-tools-panel-border);
  border-radius:14px;
  background:var(--project-tools-control-bg);
  color:var(--project-tools-text);
  text-decoration:none;
  cursor:pointer;
  box-shadow:0 12px 26px rgba(15,23,42,.05);
  transition:opacity .16s ease, color .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.project-tools-user-card:hover,
.project-tools-user-card:focus-visible{
  color:var(--project-tools-text);
  background:var(--project-tools-control-hover);
  border-color:color-mix(in srgb,var(--project-tools-text) 16%,var(--project-tools-panel-border));
  box-shadow:0 14px 30px rgba(15,23,42,.07);
  outline:none;
}

[data-theme="dark"] .project-tools-user-card:hover,
[data-theme="dark"] .project-tools-user-card:focus-visible{
  background:var(--project-tools-control-hover);
  box-shadow:none;
}

.project-tools-user-card:not(.is-active):hover,
.project-tools-user-card:not(.is-active):focus-visible{
  opacity:.92;
}

.project-tools-user-card:not(.is-active):hover .project-tools-user-company,
.project-tools-user-card:not(.is-active):focus-visible .project-tools-user-company,
.project-tools-user-card:not(.is-active):hover .project-tools-user-role,
.project-tools-user-card:not(.is-active):focus-visible .project-tools-user-role{
  opacity:.88;
}

.project-tools-user-card:focus-visible{
  box-shadow:0 0 0 3px rgba(15,23,42,.06);
}

[data-theme="dark"] .project-tools-user-card:focus-visible{
  box-shadow:0 0 0 3px rgba(255,255,255,.06);
}

.project-tools-user-card.is-active{
  background:transparent;
  color:var(--project-tools-text);
  font-weight:850;
  box-shadow:none;
}

[data-theme="dark"] .project-tools-user-card.is-active{
  background:transparent;
  color:var(--project-tools-text);
  box-shadow:none;
}

.project-tools-user-avatar{
  width:56px !important;
  height:56px !important;
  min-width:56px;
  min-height:56px;
  max-width:56px !important;
  max-height:56px !important;
  flex:0 0 56px !important;
  display:grid;
  place-items:center;
  border:1px solid var(--project-tools-panel-border);
  border-radius:999px;
  background:var(--project-tools-control-bg);
  color:var(--project-tools-text);
  overflow:hidden;
  position:relative;
}

.project-tools-user-avatar .archlenz-user-avatar-initials{
  font-size:17px;
}

.project-tools-user-photo{
  width:100% !important;
  height:100% !important;
  max-width:100% !important;
  max-height:100% !important;
  display:block;
  object-fit:cover;
  border-radius:inherit;
  grid-area:1 / 1;
}

.project-tools-user-copy{
  min-width:0;
  flex:1 1 auto;
  display:grid;
  gap:2px;
  align-content:center;
}

.project-tools-user-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--project-tools-text);
  font-size:16px;
  font-weight:650;
  line-height:1.18;
}

.project-tools-user-company,
.project-tools-user-role{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.project-tools-user-company{
  color:var(--text-secondary);
  font-size:13px;
  font-weight:500;
  line-height:1.25;
}

.project-tools-user-role{
  color:var(--project-tools-muted);
  font-size:11px;
  font-weight:700;
  line-height:1.25;
}

.project-tools-user-chevron{
  flex:0 0 auto;
  color:var(--project-tools-muted);
  font-size:20px;
  line-height:1;
  opacity:.65;
  transform:translateX(-1px);
}

.project-tools-user-card:hover .project-tools-user-chevron,
.project-tools-user-card:focus-visible .project-tools-user-chevron,
.project-tools-user-card.is-active .project-tools-user-chevron{
  opacity:.95;
  color:currentColor;
}

.project-tools-nav-list{
  display:grid;
  gap:2px;
}

.project-tools-switcher{
  display:grid;
  gap:7px;
  margin:0;
}

.project-tools-switcher-label{
  display:flex;
  align-items:center;
  gap:8px;
	  color:var(--project-tools-muted);
	  font-size:13px;
	  font-weight:850;
	  letter-spacing:0;
	  text-transform:none;
	}

.project-tools-switcher select{
	  width:100%;
	  min-height:44px;
	  padding:0 38px 0 12px;
	  border:1px solid var(--project-tools-panel-border);
	  border-radius:12px;
  background:var(--project-tools-control-bg);
  color:var(--project-tools-text);
  font:inherit;
  font-size:13px;
  font-weight:820;
}

.project-tools-switcher select:focus{
  outline:none;
  border-color:rgba(96,165,250,.45);
  box-shadow:0 0 0 3px rgba(96,165,250,.16);
}

.project-tools-link,
.project-tools-action{
  position:relative;
  width:100%;
	  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:11px;
	  padding:0 14px;
	  border:0;
	  border-radius:10px;
	  background:transparent;
  color:var(--project-tools-text);
  text-decoration:none;
  font-size:14px;
  font-weight:720;
  cursor:pointer;
  transition:background .14s ease, border-color .14s ease, color .14s ease;
}

.project-tools-icon{
  width:18px;
  height:18px;
  flex:0 0 18px;
  display:inline-block;
  background-color:currentColor;
  mask-repeat:no-repeat;
  mask-position:center;
  mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  -webkit-mask-size:contain;
  color:var(--module-family-color,var(--module-neutral));
  opacity:.78;
  transition:opacity .16s ease;
}

.project-tools-link > span:not(.project-tools-icon),
.project-tools-action > span:not(.project-tools-icon){
  min-width:0;
}

.project-tools-link:hover,
.project-tools-link:focus-visible,
.project-tools-action:hover,
.project-tools-action:focus-visible{
  background:var(--project-tools-hover-bg);
}

.project-tools-link:focus-visible,
.project-tools-action:focus-visible{
  outline:2px solid color-mix(in srgb,var(--project-tools-text) 46%,transparent);
  outline-offset:1px;
}

[data-theme="dark"] .project-tools-link:hover,
[data-theme="dark"] .project-tools-link:focus-visible,
[data-theme="dark"] .project-tools-action:hover,
[data-theme="dark"] .project-tools-action:focus-visible{
  background:var(--project-tools-hover-bg);
}

.project-tools-link.is-active{
  background:transparent;
  color:var(--project-tools-text);
  font-weight:850;
  box-shadow:none;
}

[data-theme="dark"] .project-tools-link.is-active{
  background:transparent;
  color:var(--project-tools-text);
}

.project-tools-link::before{
  content:"";
  position:absolute;
  top:10px;
  bottom:10px;
  left:3px;
  width:4px;
  border-radius:999px;
  background:var(--module-family-color,var(--module-neutral));
  opacity:0;
  transform:translateY(2px);
  transform-origin:center;
  transition:
    opacity .18s cubic-bezier(.22,1,.36,1),
    transform .18s cubic-bezier(.22,1,.36,1),
    background-color .18s ease;
}

.project-tools-link.is-active::before{
  opacity:1;
  transform:translateY(0);
}

.project-tools-link.is-active .project-tools-icon{
  opacity:1;
}

@media(hover:hover) and (pointer:fine){
  .project-tools-link:hover,
  .project-tools-action:hover{background:var(--project-tools-hover-bg)}
}

@media(hover:none),(pointer:coarse){
  .project-tools-link:hover,
  .project-tools-action:hover{background:transparent}
}

.project-tools-link[hidden],
.project-tools-action[hidden],
.project-tools-section[hidden]{
  display:none !important;
}

.project-tools-logout{
  color:#dc2626;
}

[data-theme="dark"] .project-tools-logout{
  color:#fecaca;
}

body.project-tools-open{
  overflow:hidden;
}

@media (max-width: 640px){
  .project-tools-button{
    min-height:36px;
    padding:0 12px;
    font-size:12px;
  }

  .project-tools-drawer{
    inset:0;
    width:100%;
    height:auto;
    max-height:100dvh;
    padding:0;
    transform:translateX(14px);
  }

  .project-tools-panel{
    min-height:100dvh;
    max-height:100dvh;
    border-radius:0;
  }

  .project-tools-head{
    gap:8px;
    padding:calc(20px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left));
  }

  .project-tools-body{
    padding:16px max(14px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .project-tools-link,
  .project-tools-action{
    min-height:50px;
  }

  .project-tools-switcher select{
    min-height:48px;
  }
}

@media (prefers-reduced-motion: reduce){
  .project-tools-backdrop,
  .project-tools-drawer,
  .project-tools-link,
  .project-tools-action,
  .project-tools-icon,
  .project-tools-link::before{
    transition:none !important;
  }

  .project-tools-drawer{
    opacity:1;
    transform:none;
  }

  .project-tools-link::before{
    transform:none;
  }
}
.portfolio-error{
  min-height:calc(100vh - 120px);
  display:grid;
  place-items:center;
  padding:clamp(32px, 8vw, 88px) var(--portal-page-gutter);
}

.portfolio-error[hidden]{
  display:none;
}

.portfolio-error-card{
  width:min(100%, 520px);
  padding:clamp(26px, 5vw, 42px);
  border:1px solid var(--border-color);
  border-radius:20px;
  background:var(--card-bg);
  box-shadow:var(--project-dashboard-card-shadow);
  text-align:center;
}

.portfolio-error-card h1{
  margin:0 0 10px;
  font-size:clamp(26px, 4vw, 34px);
}

.portfolio-error-card p{
  margin:0 auto 22px;
  color:var(--text-secondary);
  line-height:1.55;
}

/* =========================================================
   Phase 3D portfolio dashboard
========================================================= */

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

.portal-overview-heading{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:18px;
}

.portal-overview-heading h1{
  margin:0;
  color:var(--text-primary);
  font-size:clamp(24px,2vw,32px);
  line-height:1.15;
  letter-spacing:-.035em;
}

.portal-overview-heading p{
  margin:7px 0 0;
  color:var(--text-secondary);
  font-size:14px;
}

.system-bar{
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
  overflow:visible;
}

.system-row{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}

.system-row .metric,
.system-row .metric.metric--date{
  appearance:none;
  align-items:center;
  justify-content:center;
  min-height:126px;
  padding:18px;
  border:1px solid var(--border-color);
  border-radius:16px;
  background:var(--card-bg);
  color:var(--text-primary);
  font:inherit;
  text-align:center;
  box-shadow:0 8px 24px rgba(15,23,42,.05);
  cursor:pointer;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.system-row .metric::before{
  content:"";
  width:34px;
  height:4px;
  margin-bottom:15px;
  margin-inline:auto;
  border-radius:999px;
  background:var(--metric-accent,#94a3b8);
}

.system-row .metric:not(:last-child)::after{
  display:none;
}

.metric--active{--metric-accent:#22c55e}
.metric--upcoming{--metric-accent:#f59e0b}
.metric--completed{--metric-accent:#8b5cf6}
.metric--total{--metric-accent:#0891b2}
.metric--date{--metric-accent:#94a3b8}

.system-row .metric-label{
  color:var(--text-secondary);
  font-size:11px;
  font-weight:800;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.system-row .metric-value{
  margin-top:7px;
  color:var(--text-primary);
  font-size:clamp(25px,2vw,34px);
  font-weight:800;
  line-height:1;
  letter-spacing:-.04em;
}

.system-row .metric-value--date{
  font-size:clamp(18px,1.4vw,24px);
  line-height:1.1;
}

.metric-detail{
  width:100%;
  margin-top:0;
  padding-top:9px;
  color:var(--text-secondary);
  font-size:12px;
  line-height:1.25;
  text-align:center;
}

.system-row .metric:focus-visible,
.projects-search:focus-within,
.projects-control:focus-within,
.projects-view-btn:focus-visible,
.project-section-toggle:focus-visible,
.recent-library-link:focus-visible{
  outline:3px solid color-mix(in srgb,var(--text-primary) 24%,transparent);
  outline-offset:3px;
}

.portal-projects-section{
  margin-top:34px;
}

.projects-section-header{
  align-items:flex-end;
  margin-bottom:24px;
}

.projects-toolbar-controls{
  gap:10px;
}

.projects-search{
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  width:min(310px,28vw);
  min-height:48px;
  padding:0 15px;
  border:1px solid var(--border-color);
  border-radius:999px;
  background:var(--card-bg);
  color:var(--text-secondary);
  box-shadow:0 8px 24px rgba(15,23,42,.04);
}

.projects-control-icon--search{
  mask-image:url("/assets/icons/ui/search.svg");
  -webkit-mask-image:url("/assets/icons/ui/search.svg");
}

.projects-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text-primary);
  font:inherit;
  font-size:14px;
}

.projects-search input::placeholder{color:var(--text-secondary)}

.portal-lifecycle-sections{
  display:flex;
  flex-direction:column;
  gap:34px;
}

.project-lifecycle-section{
  scroll-margin-top:92px;
}

.project-lifecycle-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}

.project-lifecycle-heading{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}

.project-lifecycle-heading h2{
  margin:0;
  color:var(--text-primary);
  font-size:clamp(18px,1.45vw,22px);
  line-height:1.2;
  letter-spacing:-.02em;
}

.lifecycle-accent{
  width:4px;
  height:22px;
  flex:0 0 auto;
  border-radius:999px;
  background:#94a3b8;
}

.project-lifecycle-section--active .lifecycle-accent{background:#22c55e}
.project-lifecycle-section--upcoming .lifecycle-accent{background:#f59e0b}
.project-lifecycle-section--completed .lifecycle-accent{background:#8b5cf6}
.project-lifecycle-section--archived .lifecycle-accent,
.project-lifecycle-section--unknown .lifecycle-accent{background:#64748b}

.project-lifecycle-count{
  display:inline-grid;
  place-items:center;
  min-width:25px;
  min-height:25px;
  padding:0 7px;
  border-radius:999px;
  background:var(--surface-soft);
  color:var(--text-secondary);
  font-size:12px;
  font-weight:800;
}

.project-section-toggle{
  appearance:none;
  min-height:38px;
  padding:0 14px;
  border:1px solid var(--border-color);
  border-radius:999px;
  background:var(--card-bg);
  color:var(--text-primary);
  font:inherit;
  font-size:12px;
  font-weight:750;
  cursor:pointer;
}

.project-section-toggle{
  display:inline-grid;
  place-items:center;
  width:36px;
  min-width:36px;
  height:36px;
  min-height:36px;
  padding:0;
}

.project-section-toggle-icon{
  width:16px;
  height:16px;
  background:currentColor;
  mask-repeat:no-repeat;
  mask-position:center;
  mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  -webkit-mask-position:center;
  -webkit-mask-size:contain;
}

.project-section-toggle-icon.is-expanded{
  mask-image:url("/assets/icons/ui/chevron-up.svg");
  -webkit-mask-image:url("/assets/icons/ui/chevron-up.svg");
}

.project-section-toggle-icon.is-collapsed{
  mask-image:url("/assets/icons/ui/chevron-up.svg");
  -webkit-mask-image:url("/assets/icons/ui/chevron-up.svg");
  transform:rotate(180deg);
}

.project-lifecycle-region[hidden]{display:none}

.project-lifecycle-region .portal-project-grid{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:20px;
  align-items:stretch;
}

.project-lifecycle-region .portal-project-grid.lifecycle-empty-grid{
  grid-template-columns:minmax(0,1fr);
}

.project-lifecycle-region .portal-project-grid[data-project-count="1"]{
  grid-template-columns:minmax(0,1fr);
}

.project-lifecycle-region .portal-project-grid[data-project-count="2"]{
  grid-template-columns:repeat(2,minmax(0,1fr));
}

.project-lifecycle-region .portal-project-grid[data-project-count="3"]{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

.project-lifecycle-region .portal-project-grid[data-project-count="4"]{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.project-lifecycle-region .portal-project-grid[data-project-count="5"],
.project-lifecycle-region .portal-project-grid[data-project-count="many"]{
  grid-template-columns:repeat(5,minmax(260px,1fr));
}

.project-lifecycle-region .portal-project-grid.is-list{
  display:flex;
}

.project-card-content{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:start;
  gap:12px;
  padding:16px;
}

.project-lifecycle-region .portal-project-grid:not(.is-list) .portal-project-card{
  --portal-project-card-radius:22px;
  height:100%;
  align-self:stretch;
  overflow:hidden;
  border-radius:var(--portal-project-card-radius);
  box-shadow:0 14px 30px rgba(15,23,42,.05);
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
}

@media (min-width:800px){
  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .portal-project-card,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .portal-project-card{
    display:grid;
    grid-template-columns:minmax(240px,38%) minmax(0,1fr);
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .portal-project-card{
    grid-template-columns:minmax(0,42%) minmax(0,1fr);
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .project-card-media,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .project-card-media{
    height:100%;
    min-height:230px;
    max-height:290px;
    aspect-ratio:auto;
    overflow:hidden;
    border-right:1px solid var(--border-color);
    border-bottom:0;
    border-radius:var(--portal-project-card-radius) 0 0 var(--portal-project-card-radius);
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .project-card-media > img,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .project-card-media > img{
    border-radius:inherit;
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .project-card-content,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .project-card-content{
    display:grid;
    grid-template-rows:auto minmax(20px,1fr) auto;
    align-items:stretch;
    gap:0;
    min-height:230px;
    box-sizing:border-box;
    padding:22px;
    border-radius:0 var(--portal-project-card-radius) var(--portal-project-card-radius) 0;
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .project-card-info,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .project-card-info{
    grid-row:1;
    width:min(100%,560px);
    max-width:560px;
    align-self:start;
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .project-card-footer,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .project-card-footer{
    grid-row:3;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    column-gap:18px;
    margin-top:0;
    padding-top:14px;
    border-top:1px solid var(--border-color);
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .project-updated-date,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .project-updated-date{
    justify-self:start;
  }

  .project-lifecycle-region .portal-project-grid[data-project-count="1"] .portal-project-action,
  .project-lifecycle-region .portal-project-grid[data-project-count="2"] .portal-project-action{
    justify-self:end;
  }
}

.portal-project-grid .project-card-media{
  aspect-ratio:16 / 10;
  background:linear-gradient(180deg,rgba(15,23,42,.04),rgba(15,23,42,.12));
}

.portal-project-grid .project-card-media > img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .22s ease;
}

.portal-project-grid .portal-project-card:hover .project-card-media{
  transform:none;
}

.project-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  width:100%;
  margin-top:auto;
  padding-top:4px;
}

.project-updated-date{
  min-width:0;
  overflow:hidden;
  color:var(--text-secondary);
  text-overflow:ellipsis;
  white-space:nowrap;
}

.project-construction-status{
  color:var(--status-active-text);
  font-weight:700;
}

.project-schedule{margin-top:2px}

.project-card-metrics{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:3px 6px;
  margin-top:8px;
  padding-top:10px;
  border-top:1px solid var(--border-color);
  color:var(--text-secondary);
  font-size:11px;
  line-height:1.35;
}

.project-card-metrics span{
  display:inline;
}

.project-card-metrics strong{
  color:var(--text-primary);
  font-size:inherit;
}

.project-card-metrics .project-metric-separator{color:var(--text-secondary)}

.badge-hero.upcoming-status,
.project-list-status.upcoming-status{
  border-color:#b45309;
  background:#92400e;
  color:#fff7ed;
  font-weight:800;
}

[data-theme="dark"] .badge-hero.upcoming-status,
[data-theme="dark"] .project-list-status.upcoming-status{
  border-color:#fbbf24;
  background:#fbbf24;
  color:#271500;
}

.lifecycle-empty-state{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  width:100%;
  min-width:0;
  min-height:128px;
  box-sizing:border-box;
  margin:0;
  padding:22px 24px;
  border:1px solid var(--border-color);
  border-radius:22px;
  background:var(--card-bg);
  color:var(--text-primary);
  font-size:13px;
  text-align:center;
}

.lifecycle-empty-state span{color:var(--text-secondary)}

.lifecycle-empty-state strong{
  font-size:14px;
  line-height:1.3;
}

.lifecycle-empty-icon{
  width:28px;
  height:28px;
  margin-bottom:3px;
  border-radius:999px;
  background:var(--status-completed-text,#8b5cf6);
  mask:url("/assets/icons/ui/folder-open.svg") center/contain no-repeat;
  -webkit-mask:url("/assets/icons/ui/folder-open.svg") center/contain no-repeat;
}

.project-lifecycle-section--active .lifecycle-empty-icon{background:#22c55e}

.project-lifecycle-section--upcoming .lifecycle-empty-icon{
  background:#f59e0b;
  mask-image:url("/assets/icons/ui/calendar.svg");
  -webkit-mask-image:url("/assets/icons/ui/calendar.svg");
}

.project-lifecycle-section--completed .lifecycle-empty-icon{
  background:#8b5cf6;
  mask-image:url("/assets/icons/ui/circle-check.svg");
  -webkit-mask-image:url("/assets/icons/ui/circle-check.svg");
}

.project-lifecycle-section--archived .lifecycle-empty-icon{
  background:#64748b;
  mask-image:url("/assets/icons/ui/archive.svg");
  -webkit-mask-image:url("/assets/icons/ui/archive.svg");
}

.project-lifecycle-section--unknown .lifecycle-empty-icon{
  background:#64748b;
  mask-image:url("/assets/icons/ui/circle-question-mark.svg");
  -webkit-mask-image:url("/assets/icons/ui/circle-question-mark.svg");
}

.recent-captures{
  margin-top:42px;
  margin-bottom:16px;
  scroll-margin-top:92px;
}

.recent-captures-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:38px;
  margin-bottom:16px;
}

.recent-captures .section-title{margin:0}

.recent-library-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:36px;
  padding:0 12px;
  border:1px solid transparent;
  border-radius:999px;
  color:var(--text-primary);
  font-size:13px;
  font-weight:750;
  text-decoration:none;
  transition:background-color .18s ease,border-color .18s ease;
}

.recent-row{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:16px;
}

.recent-item,
.recent-item:nth-child(n){
  display:flex;
  border-radius:18px;
  box-shadow:0 8px 22px rgba(15,23,42,.05);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}

.recent-thumb{
  position:relative;
  aspect-ratio:16 / 10;
  overflow:hidden;
}

.recent-new-badge{
  position:absolute;
  top:9px;
  left:9px;
  padding:4px 7px;
  border-radius:999px;
  background:#111827;
  color:#fff;
  font-size:9px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.recent-meta{
  gap:4px;
  padding:12px 13px 13px;
}
.recent-meta span{display:block}
.recent-visit-label{color:var(--text-secondary);font-size:11px}

@media (min-width:1600px){
  .recent-row{
    grid-template-columns:repeat(6,minmax(0,250px));
    justify-content:space-between;
  }
}

@media (hover:hover) and (pointer:fine){
  .system-row .metric:hover{
    transform:translateY(-2px);
    border-color:color-mix(in srgb,var(--metric-accent) 48%,var(--border-color));
    box-shadow:0 13px 28px rgba(15,23,42,.08);
  }
  .project-section-toggle:hover{
    border-color:color-mix(in srgb,var(--text-primary) 24%,var(--border-color));
    background:var(--surface-soft);
  }
  .project-lifecycle-region .portal-project-grid:not(.is-list) .portal-project-card:hover{
    transform:translateY(-3px);
    border-color:color-mix(in srgb,var(--text-primary) 22%,var(--border-color));
    box-shadow:0 18px 36px rgba(15,23,42,.1);
  }
  .portal-project-grid .portal-project-card:hover .project-card-media > img{
    transform:scale(1.005);
  }
  .recent-item:hover{
    transform:translateY(-2px);
    border-color:color-mix(in srgb,var(--text-primary) 18%,var(--border-color));
    box-shadow:0 13px 28px rgba(15,23,42,.08);
  }
  .recent-item:hover .recent-thumb img{
    transform:scale(1.005);
  }
  .recent-library-link:hover{
    border-color:var(--border-color);
    background:var(--surface-soft);
  }
}

.project-lifecycle-region .portal-project-grid:not(.is-list) .portal-project-card:focus-visible{
  border-color:color-mix(in srgb,var(--text-primary) 30%,var(--border-color));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--text-primary) 12%,transparent),0 16px 34px rgba(15,23,42,.09);
}

.recent-item:focus-visible{
  border-color:color-mix(in srgb,var(--text-primary) 28%,var(--border-color));
  box-shadow:0 0 0 3px color-mix(in srgb,var(--text-primary) 12%,transparent),0 12px 26px rgba(15,23,42,.07);
}

.recent-library-link:focus-visible{
  outline:3px solid color-mix(in srgb,var(--text-primary) 24%,transparent);
  outline-offset:2px;
}

@media (max-width:1199px){
  .system-row{grid-template-columns:repeat(3,minmax(0,1fr))}
  .projects-section-header{align-items:flex-start;flex-direction:column}
  .projects-toolbar,.projects-toolbar-controls{width:100%;justify-content:flex-start}
  .projects-search{width:min(100%,340px)}
  .recent-row{
    display:flex;
    overflow-x:auto;
    padding-bottom:8px;
    scroll-snap-type:x mandatory;
    scrollbar-width:thin;
  }
  .recent-item,.recent-item:nth-child(n){flex:0 0 min(31vw,250px);scroll-snap-align:start}
}

@media (max-width:1599px){
  .project-lifecycle-region .portal-project-grid[data-project-count="5"],
  .project-lifecycle-region .portal-project-grid[data-project-count="many"]{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media (max-width:1099px){
  .project-lifecycle-region .portal-project-grid[data-project-count="4"],
  .project-lifecycle-region .portal-project-grid[data-project-count="5"],
  .project-lifecycle-region .portal-project-grid[data-project-count="many"]{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media (max-width:899px){
  .system-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .system-row .metric,.system-row .metric.metric--date{min-height:133px}
  .recent-item,.recent-item:nth-child(n){flex-basis:min(42vw,280px)}
}

@media (max-width:799px){
  .project-lifecycle-region .portal-project-grid[data-project-count="3"],
  .project-lifecycle-region .portal-project-grid[data-project-count="4"],
  .project-lifecycle-region .portal-project-grid[data-project-count="5"],
  .project-lifecycle-region .portal-project-grid[data-project-count="many"]{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:768px){
  .projects-toolbar-controls{flex-direction:column;align-items:stretch}
  .projects-search{width:100%}
  .projects-control,.projects-view-toggle{width:100%;box-sizing:border-box;flex:0 0 auto}
  .projects-control select{flex:1}
  .projects-view-btn{flex:1;justify-content:center}
  .recent-item,.recent-item:nth-child(n){flex-basis:min(78vw,300px)}
}

@media (max-width:559px){
  .portal-overview-heading p{font-size:13px}
  .system-row .metric,.system-row .metric.metric--date{min-height:127px;padding:15px}
  .project-lifecycle-region .portal-project-grid[data-project-count]{grid-template-columns:minmax(0,1fr)}
  .project-lifecycle-header{align-items:flex-start}
  .project-card-footer{align-items:flex-end}
}

@media (max-width:420px){
  .system-row{grid-template-columns:1fr}
}

@media (prefers-reduced-motion:reduce){
  .system-row .metric,
  .project-lifecycle-region .portal-project-grid:not(.is-list) .portal-project-card,
  .portal-project-grid .portal-project-card .project-card-media > img,
  .recent-item,
  .recent-thumb img,
  .recent-library-link,
  .portal-project-action{transition:none}
  .project-lifecycle-region .portal-project-grid:not(.is-list) .portal-project-card:hover,
  .recent-item:hover,
  .portal-project-action:hover{transform:none}
  .portal-project-grid .portal-project-card:hover .project-card-media > img,
  .recent-item:hover .recent-thumb img{transform:none}
  html:focus-within{scroll-behavior:auto}
}
