/* ============================================================
   Sentry Shading — Client Portal styles
   Mock-only. Cream/gold/black brand; SaaS-density layout.
   ============================================================ */

:root {
  --p-cream: #F4EFE3;
  --p-cream-2: #EEE7D5;
  --p-white: #FFFFFF;
  --p-black: #1A1A1C;
  --p-off-black: #2A2A2D;
  --p-gold: #CE9F41;
  --p-gold-bright: #E0AC4F;
  --p-gold-dark: #A87E33;
  --p-grey-text: #4A4A4D;
  --p-grey-label: #8A8A90;
  --p-hairline: #DDD7C7;
  --p-hairline-dk: rgba(255,255,255,0.12);
  --p-bg: #FBF8F0;
  --p-card: #FFFFFF;
  --p-shadow-sm: 0 1px 2px rgba(26,26,28,0.04), 0 1px 1px rgba(26,26,28,0.03);
  --p-shadow-md: 0 4px 12px rgba(26,26,28,0.06), 0 2px 4px rgba(26,26,28,0.04);
  --p-shadow-lg: 0 12px 28px rgba(26,26,28,0.10), 0 4px 8px rgba(26,26,28,0.04);
  --p-radius: 8px;
  --p-radius-sm: 4px;
  --p-ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Status colors */
  --s-green: #2E8B57;
  --s-green-bg: rgba(46,139,87,0.08);
  --s-amber: #C9821E;
  --s-amber-bg: rgba(201,130,30,0.10);
  --s-blue: #2C5FA8;
  --s-blue-bg: rgba(44,95,168,0.08);
  --s-red: #B8413B;
  --s-red-bg: rgba(184,65,59,0.08);
  --s-grey: #6B6F76;
  --s-grey-bg: rgba(107,111,118,0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--p-bg);
  color: var(--p-black);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* ============================================================
   TOP NAV — portal shell
   ============================================================ */
.p-nav {
  height: 64px;
  background: var(--p-black);
  border-bottom: 1px solid #000;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 2rem;
}
.p-nav__logo { display: flex; align-items: center; gap: 0.6rem; color: var(--p-white); }
.p-nav__logo img { height: 28px; }
.p-nav__divider { width: 1px; height: 24px; background: rgba(255,255,255,0.15); }
.p-nav__pill {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--p-gold);
  border: 1px solid var(--p-gold);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.p-nav__links { display: flex; gap: 0.4rem; margin-left: 0.5rem; flex: 1; }
.p-nav__link {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding: 0.55rem 0.85rem;
  border-radius: var(--p-radius-sm);
  transition: color 0.15s var(--p-ease), background 0.15s var(--p-ease);
}
.p-nav__link:hover { color: var(--p-white); background: rgba(255,255,255,0.05); }
.p-nav__link.is-active { color: var(--p-gold); background: rgba(206,159,65,0.08); }

.p-nav__actions { display: flex; align-items: center; gap: 0.75rem; }
.p-nav__bell {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.75);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 0.15s var(--p-ease);
}
.p-nav__bell:hover { background: rgba(255,255,255,0.06); color: var(--p-white); }
.p-nav__bell svg { width: 20px; height: 20px; }
.p-nav__bell::after {
  content: '';
  position: absolute;
  top: 8px; right: 9px;
  width: 8px; height: 8px;
  background: var(--p-gold);
  border-radius: 50%;
  border: 2px solid var(--p-black);
}
.p-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.6rem 0.3rem 0.3rem;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s var(--p-ease);
}
.p-user:hover { background: rgba(255,255,255,0.1); }
.p-user__avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--p-gold);
  color: var(--p-black);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center;
}
.p-user__name {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--p-white);
}
.p-user__company {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.55);
  display: block;
  font-weight: 400;
}

/* ============================================================
   PAGE SHELL
   ============================================================ */
.p-page {
  padding: 2rem clamp(1.5rem, 4vw, 3rem) 4rem;
  max-width: 1400px;
  margin: 0 auto;
}
.p-page__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 1.75rem;
  gap: 2rem;
  flex-wrap: wrap;
}
.p-page__title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.01em;
}
.p-page__crumb {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--p-gold);
  margin: 0 0 0.5rem;
}
.p-page__subtitle {
  color: var(--p-grey-text);
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.p-card {
  background: var(--p-card);
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius);
  padding: 1.4rem;
  transition: box-shadow 0.18s var(--p-ease), transform 0.18s var(--p-ease);
}
.p-card--clickable { cursor: pointer; }
.p-card--clickable:hover { box-shadow: var(--p-shadow-md); transform: translateY(-1px); }
.p-card--feature {
  background: linear-gradient(135deg, var(--p-black) 0%, var(--p-off-black) 100%);
  color: var(--p-white);
  border-color: transparent;
}

.p-card__head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
  gap: 1rem;
}
.p-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p-grey-label);
  margin: 0;
}
.p-card--feature .p-card__title { color: rgba(255,255,255,0.55); }

.p-card__action {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-gold);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.15s var(--p-ease);
}
.p-card__action:hover { gap: 0.5rem; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.p-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.p-badge--green { color: var(--s-green); background: var(--s-green-bg); }
.p-badge--amber { color: var(--s-amber); background: var(--s-amber-bg); }
.p-badge--blue  { color: var(--s-blue);  background: var(--s-blue-bg); }
.p-badge--red   { color: var(--s-red);   background: var(--s-red-bg); }
.p-badge--grey  { color: var(--s-grey);  background: var(--s-grey-bg); }
.p-badge--live::before { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.p-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.7rem 1.2rem;
  border-radius: var(--p-radius-sm);
  cursor: pointer;
  border: 0;
  transition: background 0.15s var(--p-ease), transform 0.15s var(--p-ease);
}
.p-btn--gold {
  background: var(--p-gold);
  color: var(--p-black);
}
.p-btn--gold:hover { background: var(--p-gold-bright); transform: translateY(-1px); }
.p-btn--ghost {
  background: transparent;
  color: var(--p-black);
  border: 1px solid var(--p-hairline);
}
.p-btn--ghost:hover { border-color: var(--p-black); background: var(--p-cream); }
.p-btn--dark {
  background: var(--p-black);
  color: var(--p-white);
}
.p-btn--dark:hover { background: var(--p-off-black); transform: translateY(-1px); }
.p-btn--sm { padding: 0.5rem 0.85rem; font-size: 0.7rem; }
.p-btn svg { width: 14px; height: 14px; }

/* ============================================================
   GRIDS
   ============================================================ */
.p-grid { display: grid; gap: 1.25rem; }
.p-grid--2 { grid-template-columns: 2fr 1fr; }
.p-grid--3 { grid-template-columns: repeat(3, 1fr); }
.p-grid--4 { grid-template-columns: repeat(4, 1fr); }
.p-grid--auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 900px) {
  .p-grid--2, .p-grid--3, .p-grid--4 { grid-template-columns: 1fr; }
}

/* ============================================================
   KPI STAT CARDS
   ============================================================ */
.p-stat__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p-grey-label);
  margin: 0 0 0.5rem;
}
.p-stat__value {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0;
}
.p-stat__sub {
  font-size: 0.78rem;
  color: var(--p-grey-text);
  margin: 0.45rem 0 0;
}
.p-stat__sub--up { color: var(--s-green); font-weight: 600; }
.p-stat__sub--down { color: var(--s-red); font-weight: 600; }

/* ============================================================
   SMARTSCAN HERO CARD
   ============================================================ */
.smartscan {
  background: linear-gradient(135deg, var(--p-black) 0%, #232328 50%, var(--p-off-black) 100%);
  color: var(--p-white);
  border-radius: var(--p-radius);
  padding: 1.75rem;
  position: relative;
  overflow: hidden;
}
.smartscan__head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}
.smartscan__brand {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--p-gold);
}
.smartscan__brand span { color: rgba(255,255,255,0.4); font-weight: 500; }
.smartscan__eta {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 0.35rem;
}
.smartscan__eta span { color: var(--p-gold); }
.smartscan__sub {
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-size: 0.92rem;
}
.smartscan__map {
  margin-top: 1.5rem;
  background: #1A1A1C;
  border-radius: var(--p-radius-sm);
  height: 240px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}
.smartscan__map svg { width: 100%; height: 100%; display: block; }
.smartscan__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.smartscan__lasttick {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}
.smartscan__lasttick strong { color: var(--p-gold); font-weight: 600; }

/* ============================================================
   ORDER TIMELINE
   ============================================================ */
.timeline {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0;
  margin: 1.25rem 0 0.5rem;
  position: relative;
}
.timeline__step {
  text-align: center;
  position: relative;
  padding-top: 38px;
}
.timeline__step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--p-hairline);
  z-index: 0;
}
.timeline__step:last-child::before { display: none; }
.timeline__step::after {
  content: '';
  position: absolute;
  top: 6px;
  left: calc(50% - 9px);
  width: 18px;
  height: 18px;
  background: var(--p-white);
  border: 2px solid var(--p-hairline);
  border-radius: 50%;
  z-index: 1;
}
.timeline__step.is-done::before { background: var(--s-green); }
.timeline__step.is-done::after {
  background: var(--s-green);
  border-color: var(--s-green);
}
.timeline__step.is-active::before { background: linear-gradient(90deg, var(--s-green) 50%, var(--p-hairline) 50%); }
.timeline__step.is-active::after {
  background: var(--p-gold);
  border-color: var(--p-gold);
  box-shadow: 0 0 0 4px rgba(206,159,65,0.18);
  animation: pulse 1.8s ease-in-out infinite;
}
.timeline__label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--p-grey-label);
  display: block;
  line-height: 1.3;
}
.timeline__step.is-done .timeline__label,
.timeline__step.is-active .timeline__label { color: var(--p-black); }
.timeline__time {
  font-size: 0.7rem;
  color: var(--p-grey-label);
  display: block;
  margin-top: 0.25rem;
}

/* ============================================================
   TABLES
   ============================================================ */
/* Lets a wide table scroll horizontally within its own box on narrow
   viewports instead of being clipped by .p-table-wrap's overflow:hidden
   (which exists for the rounded corners, not to hide content). */
.p-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 700px) {
  .p-table-scroll .p-table { min-width: 640px; }
}
.p-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--p-white);
}
.p-table thead th {
  text-align: left;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--p-grey-label);
  padding: 0.8rem 1rem;
  border-bottom: 1.5px solid var(--p-hairline);
  background: var(--p-cream);
}
.p-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid var(--p-hairline);
  font-size: 0.9rem;
  vertical-align: middle;
}
.p-table tbody tr { transition: background 0.12s var(--p-ease); cursor: pointer; }
.p-table tbody tr:hover { background: var(--p-cream); }
.p-table tbody tr:last-child td { border-bottom: 0; }
.p-table__id {
  font-family: 'Manrope', monospace;
  color: var(--p-grey-text);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.p-table__primary { font-weight: 600; color: var(--p-black); }
.p-table__amount { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.p-table-wrap {
  background: var(--p-white);
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius);
  overflow: hidden;
}
.p-table-wrap__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--p-hairline);
  background: var(--p-cream-2);
}
.p-table-wrap__head h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ============================================================
   ACTIVITY FEED
   ============================================================ */
.feed { display: flex; flex-direction: column; gap: 1rem; }
.feed__item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--p-hairline);
}
.feed__item:last-child { border-bottom: 0; padding-bottom: 0; }
.feed__icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--p-cream);
  color: var(--p-gold);
  flex-shrink: 0;
}
.feed__icon svg { width: 18px; height: 18px; }
.feed__icon--green { background: var(--s-green-bg); color: var(--s-green); }
.feed__icon--blue { background: var(--s-blue-bg); color: var(--s-blue); }
.feed__icon--amber { background: var(--s-amber-bg); color: var(--s-amber); }
.feed__title {
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.4;
}
.feed__title strong { font-weight: 600; }
.feed__time {
  font-size: 0.75rem;
  color: var(--p-grey-label);
  margin: 0.2rem 0 0;
}

/* ============================================================
   PROJECT TILE
   ============================================================ */
.project-tile {
  background: var(--p-white);
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius);
  padding: 1.25rem;
  transition: box-shadow 0.18s var(--p-ease), transform 0.18s var(--p-ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.project-tile:hover { box-shadow: var(--p-shadow-md); transform: translateY(-2px); }
.project-tile__head { display: flex; justify-content: space-between; align-items: start; gap: 0.75rem; }
.project-tile__name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  margin: 0;
  line-height: 1.2;
}
.project-tile__loc {
  font-size: 0.78rem;
  color: var(--p-grey-label);
  margin: 0.2rem 0 0;
}
.project-tile__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--p-hairline);
}
.project-tile__k {
  font-size: 0.68rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-grey-label);
  margin: 0;
}
.project-tile__v {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.1rem 0 0;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 880px) {
  .login { grid-template-columns: 1fr; }
  .login__art { display: none; }
}
.login__art {
  background-image: url('../../assets/images/heroes/hero-home.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}
.login__art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,26,28,0.85) 0%, rgba(26,26,28,0.55) 50%, rgba(26,26,28,0.4) 100%);
}
.login__art-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  color: var(--p-white);
}
.login__art-logo img { height: 32px; }
.login__art-quote {
  max-width: 420px;
}
.login__art-quote h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 1rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.login__art-quote p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  margin: 0;
}
.login__form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.login__form {
  width: 100%;
  max-width: 380px;
}
.login__crumb {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--p-gold);
  margin: 0 0 0.6rem;
}
.login__h {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.login__sub {
  color: var(--p-grey-text);
  margin: 0 0 2rem;
  font-size: 0.92rem;
}
.login__field { margin-bottom: 1rem; }
.login__label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-grey-text);
  margin: 0 0 0.4rem;
}
.login__input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius-sm);
  font-family: 'Manrope', sans-serif;
  font-size: 0.95rem;
  background: var(--p-white);
  transition: border-color 0.18s var(--p-ease);
}
.login__input:focus { outline: none; border-color: var(--p-gold); }
.login__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0 1.5rem;
  font-size: 0.85rem;
}
.login__row label { color: var(--p-grey-text); cursor: pointer; }
.login__row a { color: var(--p-gold); font-weight: 600; }
.login__submit {
  width: 100%;
  padding: 0.95rem;
  background: var(--p-black);
  color: var(--p-white);
  border: 0;
  border-radius: var(--p-radius-sm);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s var(--p-ease);
}
.login__submit:hover { background: var(--p-gold); color: var(--p-black); }
.login__foot {
  text-align: center;
  font-size: 0.85rem;
  color: var(--p-grey-text);
  margin: 1.5rem 0 0;
}
.login__foot a { color: var(--p-gold); font-weight: 600; }

/* ============================================================
   DOCUMENT LIST
   ============================================================ */
.doc-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--p-hairline);
  transition: background 0.12s var(--p-ease);
  cursor: pointer;
}
.doc-row:hover { background: var(--p-cream); }
.doc-row:last-child { border-bottom: 0; }
.doc-row__icon {
  width: 40px; height: 40px;
  border-radius: var(--p-radius-sm);
  background: var(--s-blue-bg);
  color: var(--s-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.doc-row__icon svg { width: 20px; height: 20px; }
.doc-row__icon--pdf { background: rgba(184,65,59,0.08); color: var(--s-red); }
.doc-row__icon--dwg { background: rgba(44,95,168,0.08); color: var(--s-blue); }
.doc-row__icon--zip { background: rgba(107,111,118,0.1); color: var(--s-grey); }
.doc-row__icon--xlsx { background: rgba(46,139,87,0.08); color: var(--s-green); }
.doc-row__name {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0;
}
.doc-row__meta {
  font-size: 0.78rem;
  color: var(--p-grey-label);
  margin: 0.2rem 0 0;
}
.doc-row__size {
  font-size: 0.78rem;
  color: var(--p-grey-label);
  font-variant-numeric: tabular-nums;
}
.doc-row__date {
  font-size: 0.78rem;
  color: var(--p-grey-label);
}

/* ============================================================
   APPROVAL QUEUE
   ============================================================ */
.approval {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius-sm);
  align-items: center;
  background: var(--p-white);
  transition: border-color 0.18s var(--p-ease);
}
.approval:hover { border-color: var(--p-gold); }
.approval__thumb {
  width: 64px; height: 64px;
  background: var(--p-cream);
  border-radius: var(--p-radius-sm);
  flex-shrink: 0;
  background-size: cover; background-position: center;
}
.approval__body { flex: 1; }
.approval__title {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}
.approval__meta {
  font-size: 0.78rem;
  color: var(--p-grey-label);
  margin: 0;
}
.approval__actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-h {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 2rem 0 1rem;
  gap: 1rem;
}
.section-h h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}
.section-h__count {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--p-grey-label);
  font-weight: 500;
}

/* ============================================================
   PROJECT DETAIL — TWO COLUMN
   ============================================================ */
.detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
}
@media (max-width: 1100px) { .detail { grid-template-columns: 1fr; } }
.detail__main { display: flex; flex-direction: column; gap: 1.25rem; }
.detail__side { display: flex; flex-direction: column; gap: 1.25rem; }

/* Rep card */
.rep {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1rem 0 0;
  border-top: 1px solid var(--p-hairline);
}
.rep__avatar {
  width: 48px; height: 48px;
  background: var(--p-gold);
  color: var(--p-black);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
}
.rep__name { margin: 0; font-weight: 600; font-size: 0.92rem; }
.rep__role { margin: 0; font-size: 0.78rem; color: var(--p-grey-label); }

/* Spec list — dl > div(dt, dd)* ; a <dl> can't take <li> children directly */
.spec-list { margin: 0; padding: 0; }
.spec-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--p-hairline);
  font-size: 0.88rem;
}
.spec-list > div:last-child { border-bottom: 0; }
.spec-list dt {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--p-grey-label);
}
.spec-list dd { margin: 0; font-weight: 500; }

/* ============================================================
   My Projects list — combined quote + order register
   ============================================================ */
.pl-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.pl-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pl-chips span { opacity: 0.65; margin-left: 0.15rem; }

.pl-search {
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--p-white); border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius-sm); padding: 0.45rem 0.75rem;
  min-width: min(20rem, 100%);
}
.pl-search svg { width: 15px; height: 15px; color: var(--p-grey-label); flex-shrink: 0; }
.pl-search input {
  border: 0; outline: none; background: transparent; width: 100%;
  font-family: 'Manrope', sans-serif; font-size: 0.85rem; color: var(--p-black);
}

/* Rows are whole-row links into the quote or order view */
.pl-table th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.pl-table th[data-sort]:hover { color: var(--p-gold); }
.pl-table th[data-dir]::after {
  content: ' \2191'; font-size: 0.75em; opacity: 0.8;
}
.pl-table th[data-dir="desc"]::after { content: ' \2193'; }

.pl-row { cursor: pointer; transition: background 0.14s var(--p-ease); }
.pl-row:hover { background: var(--p-cream); }
.pl-row:focus-visible { outline: 2px solid var(--p-gold); outline-offset: -2px; }
.pl-row:hover .pl-open { color: var(--p-gold); transform: translateX(2px); }

.pl-type {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.22rem 0.5rem; border: 1px solid currentColor; border-radius: 2px;
  white-space: nowrap;
}
.pl-type--quote { color: var(--s-blue); }
.pl-type--order { color: var(--s-green); }

.pl-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--p-grey-text); }
.pl-open { width: 24px; text-align: right; color: var(--p-grey-label); transition: color 0.14s var(--p-ease), transform 0.14s var(--p-ease); }
.pl-open svg { width: 15px; height: 15px; display: inline-block; vertical-align: middle; }

.pl-empty {
  text-align: center; padding: 2.5rem 1rem; color: var(--p-grey-label);
  font-size: 0.88rem; margin: 0;
}

/* ---------- Quote view (project detail, ?type=quote) ---------- */
.q-meta {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem 1.5rem; margin: 0 0 1.4rem;
}
.q-meta div { min-width: 0; }
.q-meta dt {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--p-grey-label); margin: 0 0 0.2rem;
}
.q-meta dd { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--p-black); }

.q-total {
  display: flex; flex-direction: column; gap: 0.45rem;
  margin: 1.4rem 0 0; padding-top: 1.1rem;
  border-top: 1px solid var(--p-hairline);
  margin-left: auto; max-width: 20rem;
}
.q-total div { display: flex; justify-content: space-between; gap: 2rem; font-size: 0.88rem; }
.q-total span { color: var(--p-grey-text); }
.q-total strong { font-variant-numeric: tabular-nums; }
.q-total__grand {
  border-top: 1px solid var(--p-hairline);
  padding-top: 0.55rem; margin-top: 0.25rem;
}
.q-total__grand span, .q-total__grand strong {
  font-family: 'Montserrat', sans-serif; font-weight: 800;
  font-size: 1rem; color: var(--p-black);
}

.q-actions {
  display: flex; flex-wrap: wrap; gap: 0.6rem;
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid var(--p-hairline);
}

@media (max-width: 720px) {
  .q-meta { grid-template-columns: repeat(2, 1fr); }
  .q-total { max-width: none; }
}

/* ---------- Orders list (Lutron-style register) ---------- */
.od-num   { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.od-money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.od-stage { color: var(--p-grey-text); }
/* project ID under the project name, the way Lutron stacks it */
.od-proj  { display: block; font-size: 0.74rem; color: var(--p-grey-label); font-variant-numeric: tabular-nums; margin-top: 0.1rem; }

.od-foot td {
  border-top: 2px solid var(--p-hairline);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--p-black); background: var(--p-cream);
}
.od-note {
  margin: 0.75rem 0 0; text-align: right;
  font-size: 0.74rem; color: var(--p-grey-label); font-style: italic;
}

/* ---------- Document vault: collapsible project groups ---------- */
.dv-search { margin-bottom: 1.25rem; max-width: 34rem; }

.dv-group {
  background: var(--p-white);
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}
.dv-head {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  width: 100%; padding: 1.05rem 1.4rem;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  transition: background 0.15s var(--p-ease);
}
.dv-head:hover { background: var(--p-cream); }
.dv-head:focus-visible { outline: 2px solid var(--p-gold); outline-offset: -2px; }
.dv-caret {
  width: 15px; height: 15px; flex-shrink: 0; color: var(--p-grey-label);
  transition: transform 0.18s var(--p-ease);
}
.dv-group.is-open .dv-caret { transform: rotate(90deg); color: var(--p-gold); }
.dv-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--p-black);
}
.dv-note { font-size: 0.8rem; color: var(--p-grey-label); }
.dv-count {
  margin-left: auto; font-size: 0.78rem; color: var(--p-grey-label); white-space: nowrap;
}

.dv-body { display: none; border-top: 1px solid var(--p-hairline); }
.dv-group.is-open .dv-body { display: block; }

.dv-chips {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.9rem 1.4rem; background: var(--p-cream);
  border-bottom: 1px solid var(--p-hairline);
}
.dv-none { padding: 1.6rem 1.4rem; margin: 0; font-size: 0.85rem; color: var(--p-grey-label); }
.dv-rows .doc-row:last-child { border-bottom: 0; }
.doc-row__icon--bim { background: rgba(46,139,87,0.08); color: var(--s-green); }

/* files not uploaded yet */
.dv-rows .p-btn[disabled] { opacity: 0.42; cursor: not-allowed; }

@media (max-width: 720px) {
  .dv-count { margin-left: 0; width: 100%; }
}
