/* =============================================================================
   Signed-in surfaces - dashboard, project detail, my access, activity, profile
   ========================================================================== */

.page-head {
  padding: 42px 0 30px;
}

.page-head h1 {
  margin-bottom: 6px;
}

.page-head .lede {
  margin: 0;
  font-size: 0.95rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 16px;
}
.breadcrumb a {
  color: var(--dim);
}
.breadcrumb a:hover {
  color: var(--accent);
}

/* ------------------------------------------------------------- readouts */

.readouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.012);
  margin-bottom: 32px;
}

.readout {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
}
.readout:last-child {
  border-right: 0;
}
.readout dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
}
.readout dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.readout dd.is-pending {
  color: var(--amber);
}
.readout dd.is-approved {
  color: var(--accent);
}

@media (max-width: 620px) {
  .readout {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .readout:last-child {
    border-bottom: 0;
  }
}

/* --------------------------------------------------------------- toolbar */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.filter-pill:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.filter-pill[aria-pressed='true'] {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.search-box {
  position: relative;
  min-width: 240px;
  flex: 0 1 320px;
}
.search-box .input {
  padding-left: 2.2rem;
  font-size: 0.86rem;
}
.search-box::before {
  content: '/';
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--dim);
  font-size: 0.85rem;
  pointer-events: none;
}

/* ---------------------------------------------------------- project card */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 18px;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.006));
  padding: 20px;
  min-height: 236px;
  transition: transform var(--t-med) var(--ease), border-color var(--t-med) var(--ease),
    box-shadow var(--t-med) var(--ease);
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, 0.9);
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(45, 212, 191, 0.07), transparent 42%);
  transition: opacity var(--t-med) var(--ease);
}
.project-card:hover::after {
  opacity: 1;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-glyph {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}

/* An uploaded icon replaces the text glyph inside the same tile. */
.card-glyph.has-image,
.project-glyph.has-image {
  padding: 5px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
.card-glyph.has-image img,
.project-glyph.has-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.project-glyph.has-image {
  padding: 8px;
}

.card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: var(--text);
}
.card-title a {
  color: inherit;
}
.card-title a:hover {
  color: var(--accent);
}

.card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}
.card-actions .btn {
  flex: 1;
}

/* --------------------------------------------------------- project page */

.project-hero {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  flex-wrap: wrap;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.project-glyph {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--r-lg);
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  flex-shrink: 0;
}

.project-headline {
  flex: 1;
  min-width: 240px;
}
.project-headline h1 {
  margin-bottom: 10px;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 26px;
  align-items: start;
}

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

.access-panel {
  position: sticky;
  top: 84px;
}

/* Access status blocks shown instead of the form once a decision exists */
.access-state {
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: center;
}
.access-state .state-icon {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  margin-bottom: 10px;
  line-height: 1;
}
.access-state h3 {
  margin-bottom: 6px;
}
.access-state p {
  font-size: 0.87rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.access-approved {
  border-color: rgba(45, 212, 191, 0.35);
  background: rgba(45, 212, 191, 0.06);
}
.access-approved .state-icon {
  color: var(--accent);
}
.access-pending {
  border-color: rgba(245, 177, 76, 0.32);
  background: rgba(245, 177, 76, 0.05);
}
.access-pending .state-icon {
  color: var(--amber);
}
.access-rejected,
.access-revoked {
  border-color: rgba(242, 88, 91, 0.32);
  background: rgba(242, 88, 91, 0.05);
}
.access-rejected .state-icon,
.access-revoked .state-icon {
  color: var(--danger);
}

.reason-box {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.86rem;
  color: var(--text-soft);
}
.reason-box .mono {
  display: block;
  margin-bottom: 5px;
}

/* --------------------------------------------------------- my access page */

.access-list {
  display: grid;
  gap: 14px;
}

.access-row {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.014);
  padding: 18px 20px;
  transition: border-color var(--t-fast) var(--ease);
}
.access-row:hover {
  border-color: var(--line-strong);
}
.access-row-main {
  flex: 1;
  min-width: 220px;
}
.access-row-main h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}
.access-row-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.access-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------- activity */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 14px 0 14px 30px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
}
.timeline li:last-child {
  border-bottom: 0;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 21px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
}
.timeline li[data-tone='good']::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.55);
}
.timeline li[data-tone='warn']::before {
  background: var(--amber);
  border-color: var(--amber);
}
.timeline li[data-tone='bad']::before {
  background: var(--danger);
  border-color: var(--danger);
}
.timeline li::after {
  content: '';
  position: absolute;
  left: 9px;
  top: 28px;
  bottom: -8px;
  width: 1px;
  background: var(--line);
}
.timeline li:last-child::after {
  display: none;
}
.timeline-text {
  flex: 1;
  min-width: 200px;
  font-size: 0.9rem;
  color: var(--text-soft);
}
.timeline-text strong {
  color: var(--text);
  font-weight: 550;
}
.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--dim);
  white-space: nowrap;
}

/* --------------------------------------------------------------- profile */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: 26px;
  align-items: start;
}

@media (max-width: 880px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }
}

.profile-identity {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.profile-identity .avatar {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}
.profile-identity h2 {
  margin: 0 0 3px;
  font-size: 1.2rem;
}
