/* ============================================================
   FTF BAT — Espace Client & Administration
   Extends the existing design system (same tokens as styles.css)
   ============================================================ */

:root {
  --bg:         #0a0806;
  --bg-2:       #0d0a07;
  --panel:      #14100b;
  --panel-2:    #100c08;
  --line:       rgba(201,168,106,.16);
  --line-soft:  rgba(201,168,106,.1);
  --gray:       #8f8678;
  --gray-soft:  #b3a994;
  --ivory:      #ddd4c4;
  --ivory-dim:  #c3b9a6;
  --gold:       #c9a86a;
  --gold-soft:  #dec18a;
  --gold-deep:  #9a7c47;

  /* status palette — muted, on-brand */
  --ok:        #84a878;   /* completed            */
  --ok-soft:   rgba(132,168,120,.14);
  --warn:      #c9a86a;   /* in progress (amber = brand gold) */
  --warn-soft: rgba(201,168,106,.12);
  --late:      #b06a5e;   /* delayed / rejected   */
  --late-soft: rgba(176,106,94,.12);
  --info:      #8aa3b5;   /* informational        */
  --info-soft: rgba(138,163,181,.12);
  --green:     var(--ok);
  --red:       var(--late);

  --font-title: 'Playfair Display', Georgia, serif;
  --font-body:  'Inter', system-ui, sans-serif;

  --ease-lux:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast:  .16s;
  --dur-med:   .3s;
  --dur-slow:  .45s;
  --edge: clamp(1.25rem, 3.5vw, 3rem);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0; background: var(--bg); color: var(--ivory);
  font-family: var(--font-body); font-weight: 300; letter-spacing: .01em;
  min-height: 100vh;
}
::selection { background: var(--gold); color: var(--bg); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2419; border-radius: 8px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.italic-serif { font-style: italic; font-family: var(--font-title); color: var(--gold-soft); }

.fx-grain { position: fixed; inset: -150%; z-index: 91; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- buttons (same as main site) ---------- */
.btn-gold {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .8rem;
  padding: .9rem 1.7rem; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 500; color: var(--bg); background: var(--gold); font-family: var(--font-body);
  border: none; border-radius: 3px; overflow: hidden; isolation: isolate; cursor: pointer;
  transition: box-shadow .5s var(--ease-lux);
}
.btn-gold::before { content:""; position:absolute; inset:0; z-index:-1; background: var(--ivory); transform: translateY(101%); transition: transform .45s var(--ease-lux); }
.btn-gold:hover { box-shadow: 0 0 40px -8px rgba(201,168,106,.55); }
.btn-gold:hover::before { transform: translateY(0); }
.btn-gold:active { transform: translateY(1px) scale(.985); }
.btn-gold:disabled { opacity: .5; pointer-events: none; }
.btn-gold { transition: box-shadow var(--dur-slow) var(--ease-lux), transform var(--dur-fast) var(--ease-out); will-change: transform; }

.btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .8rem 1.4rem; font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 400; color: var(--gold); background: transparent; font-family: var(--font-body);
  border: 1px solid rgba(201,168,106,.4); border-radius: 3px; cursor: pointer;
  transition: .4s var(--ease-lux);
}
.btn-line:hover { background: rgba(201,168,106,.08); border-color: var(--gold); }
.btn-line:active { transform: translateY(1px) scale(.97); }
.btn-line { transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.btn-line--danger { color: var(--red); border-color: rgba(176,106,94,.4); }
.btn-line--danger:hover { background: rgba(176,106,94,.08); border-color: var(--red); }
.btn-line--sm, .btn-gold--sm { padding: .5rem .9rem; font-size: .6rem; }

/* busy state: inline spinner replaces interaction */
.is-busy { position: relative; pointer-events: none; opacity: .75; }
.is-busy > * { visibility: hidden; }
.is-busy::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%;
  animation: spin .7s linear infinite; visibility: visible;
}
.btn-gold.is-busy::after { border-color: var(--bg); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; }
.field label { font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gray-soft); }
.field input, .field select, .field textarea {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 3px;
  padding: .85rem 1rem; color: var(--ivory); font-family: var(--font-body); font-weight: 300;
  font-size: .92rem; outline: none; transition: border-color .4s var(--ease-lux), box-shadow .4s var(--ease-lux);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 24px -10px rgba(201,168,106,.4); }
.field input[type="file"] { padding: .6rem; font-size: .8rem; color: var(--gray-soft); }
.field input[type="file"]::file-selector-button {
  background: rgba(201,168,106,.12); color: var(--gold); border: 1px solid var(--line);
  border-radius: 3px; padding: .45rem .9rem; margin-right: .9rem; cursor: pointer;
  font-family: var(--font-body); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.form-msg { font-size: .82rem; padding: .7rem 1rem; border-radius: 3px; margin-bottom: 1rem; display: none; line-height: 1.5; }
.form-msg.is-error { display: block; color: #d8a59c; background: rgba(176,106,94,.12); border: 1px solid rgba(176,106,94,.3); }
.form-msg.is-ok { display: block; color: #b8d3af; background: rgba(125,168,114,.1); border: 1px solid rgba(125,168,114,.28); }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 200; padding: .95rem var(--edge);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(10,8,6,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201,168,106,.1);
}
.topbar__brand { display: flex; align-items: center; gap: .8rem; }
.topbar__mark { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; font-family: var(--font-title); color: var(--gold); font-size: 1.25rem; flex: none; }
.topbar__name { font-family: var(--font-title); font-size: 1.25rem; letter-spacing: .1em; line-height: 1.1; }
.topbar__tag { display: block; font-size: .54rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.topbar__right { display: flex; align-items: center; gap: .9rem; }
.topbar__user { text-align: right; line-height: 1.3; }
.topbar__user-name { font-size: .85rem; color: var(--ivory-dim); }
.topbar__user-role { font-size: .56rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gray); }
.topbar__back { font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-soft); transition: color .3s; margin-right: .4rem; }
.topbar__back:hover { color: var(--gold); }
.iconbtn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ivory-dim);
  display: grid; place-items: center; cursor: pointer; font-size: .9rem;
  transition: .35s var(--ease-lux);
}
.iconbtn:hover { border-color: var(--gold); color: var(--gold); }
.iconbtn__badge {
  position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: var(--gold); color: var(--bg);
  font-size: .6rem; font-weight: 600; display: none; align-items: center; justify-content: center;
}
.iconbtn__badge.is-on { display: inline-flex; }
@media (max-width: 640px) { .topbar__user { display: none; } }

/* ---------- notifications dropdown ---------- */
.notif-panel {
  position: fixed; top: 70px; right: var(--edge); z-index: 300; width: min(380px, calc(100vw - 2rem));
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.8); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
  will-change: transform, opacity;
}
.notif-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.notif-panel__head { display: flex; justify-content: space-between; align-items: center; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
.notif-panel__head h3 { margin: 0; font-family: var(--font-title); font-weight: 500; font-size: 1rem; }
.notif-panel__head button { background: none; border: 0; color: var(--gold); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; font-family: var(--font-body); }
.notif-list { max-height: 400px; overflow-y: auto; overscroll-behavior: contain; }
.notif-group { padding: .7rem 1.1rem .3rem; font-size: .56rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); }
.notif-item { position: relative; display: flex; gap: .85rem; padding: .85rem 1.1rem .85rem 1.35rem; border-bottom: 1px solid var(--line-soft); transition: background var(--dur-med) var(--ease-out); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: rgba(201,168,106,.04); }
.notif-item.is-unread { background: rgba(201,168,106,.05); }
.notif-item.is-unread::before { content: ""; position: absolute; left: .55rem; top: 1.3rem; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(201,168,106,.8); }
.notif-item__ic { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: rgba(201,168,106,.06); display: grid; place-items: center; color: var(--gold); font-size: .72rem; }
.notif-item__title { font-size: .82rem; color: var(--ivory); font-weight: 400; }
.notif-item__body { font-size: .76rem; color: var(--gray-soft); line-height: 1.45; margin-top: .15rem; }
.notif-item__time { font-size: .64rem; color: var(--gray); margin-top: .3rem; }
.notif-empty { padding: 2.2rem 1.6rem; text-align: center; color: var(--gray); font-size: .82rem; line-height: 1.7; }
.notif-empty i { display: block; font-size: 1.3rem; color: var(--gold-deep); margin-bottom: .6rem; }

/* bell badge pop on change */
.iconbtn__badge.is-pop { animation: badgePop var(--dur-med) var(--ease-out); }
@keyframes badgePop { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ============================================================
   LOGIN
   ============================================================ */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem var(--edge); position: relative; }
.auth-wrap::before {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(circle, rgba(201,168,106,.1), transparent 60%); pointer-events: none;
}
.auth-card {
  position: relative; width: 100%; max-width: 430px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 5px;
  padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
}
.auth-card__mark { width: 52px; height: 52px; margin: 0 auto 1.2rem; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; font-family: var(--font-title); color: var(--gold); font-size: 1.6rem; }
.auth-card__title { font-family: var(--font-title); font-weight: 500; font-size: 1.7rem; text-align: center; margin: 0 0 .4rem; }
.auth-card__sub { text-align: center; color: var(--gray-soft); font-size: .85rem; margin: 0 0 1.9rem; line-height: 1.6; }
.auth-card__foot { margin-top: 1.4rem; text-align: center; }
.auth-link { background: none; border: 0; color: var(--gray-soft); font-size: .74rem; cursor: pointer; font-family: var(--font-body); letter-spacing: .04em; transition: color .3s; }
.auth-link:hover { color: var(--gold); }
.auth-card .btn-gold { width: 100%; }
.auth-home { position: absolute; top: 1.6rem; left: var(--edge); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gray-soft); display: inline-flex; gap: .6rem; align-items: center; transition: color .3s; }
.auth-home:hover { color: var(--gold); }

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app { max-width: 1480px; margin: 0 auto; padding: clamp(1.4rem, 3vw, 2.6rem) var(--edge) 4rem; }
.app-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.app-head__label { font-size: .6rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep); display: block; margin-bottom: .55rem; }
.app-head h1 { font-family: var(--font-title); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.6rem); margin: 0; line-height: 1.1; letter-spacing: -.01em; }
.app-head__meta { color: var(--gray-soft); font-size: .85rem; margin-top: .5rem; }
.project-select { background: var(--panel-2); border: 1px solid var(--line); color: var(--ivory); border-radius: 3px; padding: .7rem 1rem; font-family: var(--font-body); font-size: .85rem; max-width: 320px; }

/* ---------- panels ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: clamp(1.2rem, 2.4vw, 1.8rem); }
.panel + .panel { margin-top: 1.4rem; }
.panel__title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 0 1.3rem; }
.panel__title h2 { font-family: var(--font-title); font-weight: 500; font-size: 1.25rem; margin: 0; }
.panel__title .hint { font-size: .68rem; color: var(--gray); letter-spacing: .08em; }

/* ---------- dashboard meta cards ---------- */
.meta-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.meta-cell { position: relative; background: var(--panel-2); padding: 1.1rem 1.2rem; transition: background var(--dur-med) var(--ease-out); }
.meta-cell:hover { background: #15110b; }
.meta-cell::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,168,106,.5), transparent); opacity: 0; transition: opacity var(--dur-med) var(--ease-out); }
.meta-cell:hover::after { opacity: 1; }
.meta-cell__label { font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gray); display: flex; align-items: center; gap: .5rem; }
.meta-cell__label i { color: var(--gold-deep); width: 14px; text-align: center; }
.meta-cell__value { margin-top: .6rem; font-family: var(--font-title); font-weight: 500; font-size: 1.12rem; color: var(--ivory); line-height: 1.25; }
.meta-cell__value.gold { color: var(--gold); }
@media (max-width: 1024px) { .meta-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .meta-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- big progress bar ---------- */
.progress-block { margin-top: 1.6rem; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .9rem; }
.progress-top__label { font-size: .62rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gray-soft); }
.progress-top__pct { font-family: var(--font-title); font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--gold); line-height: 1; }
.progress-rail { position: relative; height: 10px; background: rgba(201,168,106,.12); border-radius: 6px; overflow: visible; }
.progress-rail__fill {
  position: absolute; left: 0; top: 0; height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft));
  box-shadow: 0 0 18px rgba(201,168,106,.5);
  transition: width 1.2s var(--ease-lux);
  overflow: hidden;
}
.progress-rail__fill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  transform: translateX(-100%); animation: shine 3.6s var(--ease-out) 1.4s infinite;
}
@keyframes shine { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
.progress-marks { display: flex; justify-content: space-between; margin-top: .7rem; }
.progress-marks span { position: relative; font-size: .64rem; letter-spacing: .12em; color: var(--gray); transition: color .5s var(--ease-out); padding-top: .55rem; }
.progress-marks span::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%) rotate(45deg); width: 5px; height: 5px; background: rgba(201,168,106,.2); transition: background .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.progress-marks span.is-passed { color: var(--gold); }
.progress-marks span.is-passed::before { background: var(--gold); box-shadow: 0 0 8px rgba(201,168,106,.6); }
.progress-marks span:first-child { padding-left: 0; }

/* ---------- phases timeline (connected progress line + cards) ---------- */
.phase-rail { display: flex; gap: 5px; margin-bottom: 1.2rem; }
.phase-rail span {
  flex: 1; height: 3px; border-radius: 2px; background: rgba(201,168,106,.12);
  position: relative; overflow: hidden;
}
.phase-rail span::after {
  content: ""; position: absolute; inset: 0; border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease-lux);
}
.phase-rail span.is-completed::after { background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); transform: scaleX(1); box-shadow: 0 0 10px rgba(201,168,106,.45); }
.phase-rail span.is-in_progress::after { background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transform: scaleX(.45); }
.phase-rail.is-revealed span::after { transition-delay: calc(var(--i, 0) * 70ms); }

.phase-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.phase {
  position: relative; display: flex; align-items: center; gap: .9rem; padding: .95rem 1.05rem;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px;
  overflow: hidden;
  transition: border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.phase::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: transparent; transition: background var(--dur-med) var(--ease-out); }
.phase__dot {
  width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .7rem; color: var(--gray);
  transition: background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
.phase__name { font-family: var(--font-title); font-size: .98rem; font-weight: 500; color: var(--ivory-dim); transition: color var(--dur-med) var(--ease-out); }
.phase__state { display: block; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gray); margin-top: .25rem; }
.phase.is-completed { border-color: rgba(132,168,120,.3); }
.phase.is-completed::before { background: var(--ok); }
.phase.is-completed .phase__dot { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.phase.is-completed .phase__dot i { animation: checkPop var(--dur-slow) var(--ease-lux) backwards; }
.phase.is-completed .phase__name { color: var(--ivory); }
.phase.is-completed .phase__state { color: var(--ok); }
.phase.is-in_progress { border-color: rgba(201,168,106,.35); }
.phase.is-in_progress::before { background: var(--gold); }
.phase.is-in_progress .phase__dot { border-color: var(--gold); color: var(--gold); background: var(--warn-soft); animation: phasePulse 2.4s ease-in-out infinite; }
.phase.is-in_progress .phase__name { color: var(--ivory); }
.phase.is-in_progress .phase__state { color: var(--gold-soft); }
@keyframes phasePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(201,168,106,.3);} 50% { box-shadow: 0 0 0 7px rgba(201,168,106,0);} }
@keyframes checkPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.25) rotate(4deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
a.phase:hover, .phase[data-phase]:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(0,0,0,.7); border-color: rgba(201,168,106,.4); }
@media (max-width: 1024px) { .phase-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .phase-list { grid-template-columns: 1fr; } }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 2rem 0 1.6rem; }
.tab {
  position: relative; background: none; border: 0; cursor: pointer; font-family: var(--font-body);
  padding: .85rem 1.1rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--gray-soft); transition: color .3s; display: inline-flex; align-items: center; gap: .55rem;
}
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .45s var(--ease-lux); }
.tab i { font-size: .78rem; width: 15px; text-align: center; transition: transform var(--dur-med) var(--ease-out); }
.tab:hover { color: var(--ivory); }
.tab:hover i { transform: translateY(-1px); }
.tab:active { transform: translateY(1px); }
.tab.is-active { color: var(--gold); }
.tab.is-active::after { transform: scaleX(1); }
.tab__count { min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: rgba(201,168,106,.16); color: var(--gold); font-size: .6rem; display: inline-flex; align-items: center; justify-content: center; }
.tabpane { display: none; }
.tabpane.is-active { display: block; animation: paneIn .5s var(--ease-lux); }
@keyframes paneIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- updates feed ---------- */
.feed { position: relative; padding-left: 1.7rem; }
.feed::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.feed-item { position: relative; padding-bottom: 1.9rem; }
.feed-item:last-child { padding-bottom: 0; }
.feed-item::before { content: ""; position: absolute; left: -1.7rem; top: 7px; width: 9px; height: 9px; margin-left: 2.5px; background: var(--gold); transform: rotate(45deg); }
.feed-item__date { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); }
.feed-item__title { font-family: var(--font-title); font-weight: 500; font-size: 1.18rem; margin: .35rem 0 .45rem; color: var(--ivory); }
.feed-item__desc { color: var(--gray-soft); font-size: .88rem; line-height: 1.7; max-width: 70ch; white-space: pre-line; }
.feed-item__photos { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.feed-item__photos a { display: block; width: 130px; height: 96px; border-radius: 3px; overflow: hidden; border: 1px solid var(--line); }
.feed-item__photos img, .feed-item__photos video { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease-lux); }
.feed-item__photos a:hover img { transform: scale(1.08); }

/* ---------- before / after ---------- */
.ba-filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.chip {
  background: transparent; border: 1px solid var(--line); color: var(--gray-soft); border-radius: 20px;
  padding: .45rem 1.05rem; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; font-family: var(--font-body); transition: .35s var(--ease-lux);
}
.chip:hover { color: var(--ivory); border-color: rgba(201,168,106,.4); }
.chip.is-active { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.ba-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 1.3rem; }
.ba-card { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px; overflow: hidden; }
.ba-card__head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; }
.ba-card__title { font-family: var(--font-title); font-weight: 500; font-size: 1rem; }
.ba-card__cat { font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.ba-card { transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.ba-card:hover { border-color: rgba(201,168,106,.32); box-shadow: 0 18px 40px -22px rgba(0,0,0,.8); }
.ba { position: relative; aspect-ratio: 16 / 10; overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize; --pos: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba__before-wrap { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 calc(100% - var(--pos)) 0 0); will-change: clip-path; }
.ba__divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: linear-gradient(to bottom, transparent, var(--gold) 18%, var(--gold) 82%, transparent); transform: translateX(-50%); will-change: left; }
.ba__handle {
  position: absolute; top: 50%; left: var(--pos); transform: translate(-50%, -50%);
  width: 42px; height: 42px; border-radius: 50%; background: rgba(10,8,6,.75); border: 1px solid var(--gold);
  color: var(--gold); display: grid; place-items: center; font-size: .7rem; backdrop-filter: blur(4px); pointer-events: none;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); will-change: left, transform;
}
.ba:hover .ba__handle { box-shadow: 0 0 24px -4px rgba(201,168,106,.5); }
.ba.is-grabbing .ba__handle { transform: translate(-50%, -50%) scale(.88); }
.ba__tag { position: absolute; bottom: .7rem; font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; padding: .32rem .7rem; background: rgba(10,8,6,.78); border: 1px solid var(--line); border-radius: 2px; color: var(--ivory-dim); pointer-events: none; backdrop-filter: blur(4px); transition: opacity var(--dur-med) var(--ease-out); }
.ba__tag--before { left: .7rem; }
.ba__tag--after { right: .7rem; }
.ba.is-min .ba__tag--before { opacity: 0; }
.ba.is-max .ba__tag--after { opacity: 0; }

/* ---------- documents ---------- */
.doc-group { margin-bottom: 1.6rem; }
.doc-group__name { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: .8rem; display: flex; align-items: center; gap: .6rem; }
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: .7rem; }
.doc {
  display: flex; align-items: center; gap: .95rem; padding: .85rem 1rem;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px;
  transition: border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.doc:hover { border-color: rgba(201,168,106,.4); transform: translateY(-2px); box-shadow: 0 14px 30px -18px rgba(0,0,0,.75); }
.doc__ic { width: 40px; height: 40px; flex: none; border-radius: 4px; background: rgba(201,168,106,.1); display: grid; place-items: center; color: var(--gold); font-size: 1rem; transition: transform var(--dur-med) var(--ease-out); }
.doc:hover .doc__ic { transform: scale(1.06); }
/* file-type tints (muted, on-brand) */
.doc__ic--pdf   { color: #cf9a8d; background: var(--late-soft); }
.doc__ic--img   { color: var(--ok); background: var(--ok-soft); }
.doc__ic--video { color: var(--info); background: var(--info-soft); }
.doc__ic--sheet { color: var(--ok); background: var(--ok-soft); }
.doc__ic--word  { color: var(--info); background: var(--info-soft); }
.doc__ic--zip   { color: var(--gray-soft); background: rgba(143,134,120,.12); }
.doc__dl .btn-line--sm:hover i { animation: dlNudge .45s var(--ease-out); }
@keyframes dlNudge { 0% { transform: translateY(0); } 45% { transform: translateY(2px); } 100% { transform: translateY(0); } }
.doc__name { font-size: .85rem; color: var(--ivory); word-break: break-word; }
.doc__meta { font-size: .66rem; color: var(--gray); margin-top: .25rem; }
.doc__dl { margin-left: auto; flex: none; }

/* ---------- change requests ---------- */
.cr-list { display: flex; flex-direction: column; gap: .9rem; }
.cr { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px; padding: 1.1rem 1.2rem; transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.cr:hover { border-color: rgba(201,168,106,.28); box-shadow: 0 14px 32px -22px rgba(0,0,0,.8); }
.cr__top { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; justify-content: space-between; }
.cr__title { font-family: var(--font-title); font-weight: 500; font-size: 1.08rem; }
.cr__type { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-soft); margin-top: .3rem; }
.cr__desc { color: var(--gray-soft); font-size: .86rem; line-height: 1.65; margin-top: .7rem; white-space: pre-line; }
.cr__extra { margin-top: .8rem; display: flex; flex-wrap: wrap; gap: 1.4rem; font-size: .8rem; color: var(--gold-soft); }
.cr__extra i { margin-right: .4rem; color: var(--gold-deep); }
.cr__response { margin-top: .8rem; padding: .8rem 1rem; background: rgba(201,168,106,.05); border-left: 2px solid var(--gold-deep); font-size: .84rem; color: var(--ivory-dim); line-height: 1.6; }
.badge { display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .8rem; border-radius: 20px; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--pending  { color: var(--gold-soft); border-color: rgba(201,168,106,.45); background: var(--warn-soft); }
.badge--pending::before { animation: dotBlink 1.8s ease-in-out infinite; }
.badge--approved { color: #a9c9a0; border-color: rgba(132,168,120,.45); background: var(--ok-soft); }
.badge--rejected { color: #d8a59c; border-color: rgba(176,106,94,.45);  background: var(--late-soft); }
.badge--neutral  { color: var(--gray-soft); border-color: var(--line); background: transparent; }
.badge--info     { color: var(--info); border-color: rgba(138,163,181,.45); background: var(--info-soft); }
@keyframes dotBlink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- messaging ---------- */
.chat { display: flex; flex-direction: column; height: 520px; background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; }
.chat__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; display: flex; flex-direction: column; gap: .9rem; scroll-behavior: smooth; }
.msg { max-width: min(75%, 560px); display: flex; flex-direction: column; gap: .3rem; }
.msg.is-new { animation: msgIn var(--dur-med) var(--ease-out) backwards; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.msg--me { align-self: flex-end; align-items: flex-end; }
.msg--me.is-sending { opacity: .55; }
.msg__bubble { padding: .75rem 1rem; border-radius: 10px; font-size: .88rem; line-height: 1.6; white-space: pre-line; word-break: break-word; }
.msg--them .msg__bubble { background: var(--panel); border: 1px solid var(--line-soft); color: var(--ivory-dim); border-bottom-left-radius: 3px; }
.msg--me .msg__bubble { background: linear-gradient(135deg, rgba(201,168,106,.16), rgba(201,168,106,.1)); border: 1px solid rgba(201,168,106,.3); color: var(--ivory); border-bottom-right-radius: 3px; }
.msg__meta { font-size: .6rem; color: var(--gray); letter-spacing: .08em; }
.msg__file { display: inline-flex; align-items: center; gap: .5rem; margin-top: .45rem; font-size: .76rem; color: var(--gold); transition: opacity var(--dur-fast); }
.msg__file:hover { text-decoration: underline; }
.msg__img { margin-top: .5rem; max-width: 240px; border-radius: 6px; border: 1px solid var(--line-soft); cursor: zoom-in; transition: transform var(--dur-med) var(--ease-out); }
.msg__img:hover { transform: scale(1.02); }

/* typing / sending indicator */
.typing { display: inline-flex; align-items: center; gap: 4px; padding: .7rem 1rem; }
.typing span { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-deep); animation: typingDot 1.2s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typingDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }

.chat__form { display: flex; gap: .6rem; align-items: flex-end; border-top: 1px solid var(--line-soft); padding: .8rem; background: var(--panel); }
.chat__form textarea { flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; color: var(--ivory); font-family: var(--font-body); font-size: .88rem; padding: .7rem .9rem; resize: none; min-height: 44px; max-height: 130px; outline: none; transition: border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out); }
.chat__form textarea:focus { border-color: var(--gold); box-shadow: 0 0 20px -10px rgba(201,168,106,.4); }

/* attachment preview chip */
.chat__attach-name { display: none; align-items: center; gap: .7rem; font-size: .72rem; color: var(--gold); padding: .55rem .8rem; margin: 0 .8rem; background: rgba(201,168,106,.07); border: 1px solid var(--line-soft); border-radius: 4px; animation: msgIn var(--dur-med) var(--ease-out); }
.chat__attach-name.is-on { display: flex; }
.chat__attach-name img { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); }
.chat__attach-name button { margin-left: auto; background: none; border: 0; color: var(--gray-soft); cursor: pointer; font-size: .8rem; padding: .2rem; transition: color var(--dur-fast); }
.chat__attach-name button:hover { color: var(--red); }

/* ---------- generic table (admin) ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .86rem; }
.tbl th { text-align: left; font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gray); font-weight: 500; padding: .7rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: .85rem .9rem; border-bottom: 1px solid var(--line-soft); color: var(--ivory-dim); vertical-align: middle; transition: background var(--dur-fast) var(--ease-out); }
.tbl tbody tr { transition: background var(--dur-fast) var(--ease-out); }
.tbl tr:hover td { background: rgba(201,168,106,.035); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .strong { color: var(--ivory); }
.tbl .actions { display: flex; gap: .45rem; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- admin layout ---------- */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; max-width: 1600px; margin: 0 auto; min-height: calc(100vh - 71px); }
.sidenav { border-right: 1px solid var(--line-soft); padding: 1.6rem 0; position: sticky; top: 71px; height: calc(100vh - 71px); overflow-y: auto; }
.sidenav a {
  display: flex; align-items: center; gap: .85rem; padding: .85rem var(--edge) .85rem 1.6rem;
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-soft);
  border-left: 2px solid transparent; transition: color var(--dur-med) var(--ease-out), background var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.sidenav a svg, .sidenav a i { width: 17px; height: 17px; flex: none; color: var(--gold-deep); stroke: var(--gold-deep); transition: color var(--dur-med) var(--ease-out), stroke var(--dur-med) var(--ease-out); }
.sidenav a:hover { color: var(--ivory); background: rgba(201,168,106,.04); }
.sidenav a:hover svg { stroke: var(--gold); color: var(--gold); }
.sidenav a.is-active { color: var(--gold); border-left-color: var(--gold); background: rgba(201,168,106,.07); }
.sidenav a.is-active svg { stroke: var(--gold); color: var(--gold); }
.sidenav a:active { transform: translateX(2px); }
.sidenav__count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(201,168,106,.16); color: var(--gold); font-size: .62rem; display: none; align-items: center; justify-content: center; }
.sidenav__count.is-on { display: inline-flex; }
.admin-main { padding: clamp(1.4rem, 2.6vw, 2.4rem) var(--edge) 4rem; min-width: 0; }
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidenav { position: static; height: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line-soft); padding: 0; }
  .sidenav a { border-left: 0; border-bottom: 2px solid transparent; white-space: nowrap; padding: .9rem 1.1rem; }
  .sidenav a.is-active { border-bottom-color: var(--gold); }
}

/* ---------- stat cards (admin dashboard) ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin-bottom: 1.6rem; }
.stat-card { position: relative; background: var(--panel-2); padding: 1.3rem 1.3rem 1.2rem; transition: background var(--dur-med) var(--ease-out); }
.stat-card:hover { background: #15110b; }
.stat-card::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(201,168,106,.5), transparent); opacity: 0; transition: opacity var(--dur-med) var(--ease-out); }
.stat-card:hover::after { opacity: 1; }
.stat-card__num { font-family: var(--font-title); font-size: 2.1rem; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.stat-card__label { margin-top: .7rem; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gray-soft); }
@media (max-width: 820px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   ADMIN DASHBOARD — construction control center
   ============================================================ */
.dash { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }

/* welcome */
.dash-welcome {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.2rem;
  padding: clamp(1.3rem, 2.5vw, 1.8rem) clamp(1.2rem, 2.4vw, 1.7rem);
  background: linear-gradient(135deg, rgba(201,168,106,.08) 0%, rgba(20,16,11,.4) 55%, var(--panel-2) 100%);
  border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden;
}
.dash-welcome::after {
  content: ""; position: absolute; right: -5%; top: -40%; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(201,168,106,.12), transparent 65%); pointer-events: none;
}
.dash-welcome__greet { font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: .45rem; }
.dash-welcome__name { font-family: var(--font-title); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0; line-height: 1.1; color: var(--ivory); }
.dash-welcome__name em { font-style: italic; color: var(--gold-soft); }
.dash-welcome__summary { margin: .65rem 0 0; color: var(--gray-soft); font-size: .92rem; line-height: 1.55; max-width: 42ch; }
.dash-welcome__date { text-align: right; font-size: .72rem; letter-spacing: .12em; color: var(--gray); line-height: 1.6; }
.dash-welcome__date strong { display: block; font-family: var(--font-title); font-size: 1.05rem; color: var(--ivory-dim); letter-spacing: .04em; font-weight: 500; margin-bottom: .2rem; }

/* stat cards — premium */
.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; }
.dash-stat {
  position: relative; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px;
  padding: 1.25rem 1.2rem 1.15rem; overflow: hidden;
  transition: border-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.dash-stat:hover { border-color: rgba(201,168,106,.35); transform: translateY(-3px); box-shadow: 0 16px 36px -20px rgba(0,0,0,.75); }
.dash-stat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.dash-stat__ic {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; background: rgba(201,168,106,.06); color: var(--gold);
}
.dash-stat__ic svg { width: 17px; height: 17px; stroke: var(--gold); }
.dash-stat__num { font-family: var(--font-title); font-size: clamp(2rem, 3.2vw, 2.65rem); color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.dash-stat__label { margin-top: .55rem; font-size: .58rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gray-soft); }

/* layout grids */
.dash-layout { display: grid; grid-template-columns: 1.45fr 1fr; gap: 1.2rem; align-items: start; }
.dash-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.dash-panel {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 6px;
  padding: clamp(1.1rem, 2vw, 1.45rem); min-width: 0;
}
.dash-panel__head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1.1rem; }
.dash-panel__head h2 { font-family: var(--font-title); font-weight: 500; font-size: 1.12rem; margin: 0; display: flex; align-items: center; gap: .55rem; }
.dash-panel__head h2 svg { width: 17px; height: 17px; stroke: var(--gold-deep); flex: none; }
.dash-panel__link { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); transition: opacity var(--dur-fast); }
.dash-panel__link:hover { opacity: .75; }

/* project overview rows */
.dash-proj { display: flex; align-items: center; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line-soft); transition: background var(--dur-fast) var(--ease-out); border-radius: 4px; text-decoration: none; color: inherit; }
.dash-proj:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-proj:first-child { padding-top: 0; }
.dash-proj:hover { background: rgba(201,168,106,.03); margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; }
.dash-proj__thumb {
  width: 64px; height: 52px; flex: none; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-soft); background: var(--panel-2);
  display: grid; place-items: center; color: var(--gold-deep);
}
.dash-proj__thumb img { width: 100%; height: 100%; object-fit: cover; }
.dash-proj__thumb svg { width: 22px; height: 22px; stroke: var(--gold-deep); opacity: .7; }
.dash-proj__body { flex: 1; min-width: 0; }
.dash-proj__name { font-family: var(--font-title); font-size: .98rem; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-proj__meta { font-size: .68rem; color: var(--gray); margin-top: .25rem; display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.dash-proj__bar { height: 4px; background: rgba(201,168,106,.12); border-radius: 3px; margin-top: .55rem; overflow: hidden; }
.dash-proj__bar-fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--gold-deep), var(--gold-soft)); transition: width 1s var(--ease-lux); box-shadow: 0 0 10px rgba(201,168,106,.4); }
.dash-proj__pct { font-size: .62rem; color: var(--gold); margin-top: .3rem; letter-spacing: .08em; }
.dash-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 20px; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; border: 1px solid; white-space: nowrap; flex: none; }
.dash-badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dash-badge--active { color: var(--gold-soft); border-color: rgba(201,168,106,.4); background: var(--warn-soft); }
.dash-badge--done { color: var(--ok); border-color: rgba(132,168,120,.4); background: var(--ok-soft); }
.dash-badge--late { color: var(--late); border-color: rgba(176,106,94,.4); background: var(--late-soft); }
.dash-badge--planned { color: var(--info); border-color: rgba(138,163,181,.4); background: var(--info-soft); }

/* latest update spotlight */
.dash-spotlight { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.1rem; align-items: stretch; }
.dash-spotlight__img {
  position: relative; border-radius: 5px; overflow: hidden; border: 1px solid var(--line-soft);
  min-height: 200px; background: var(--panel-2);
}
.dash-spotlight__img img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; transition: transform .8s var(--ease-lux); }
.dash-spotlight:hover .dash-spotlight__img img { transform: scale(1.04); }
.dash-spotlight__img-ph { min-height: 200px; display: grid; place-items: center; color: var(--gray); font-size: .82rem; text-align: center; padding: 1rem; }
.dash-spotlight__badge {
  position: absolute; bottom: .65rem; left: .65rem; font-size: .56rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .35rem .65rem; background: rgba(10,8,6,.78); border: 1px solid var(--line); border-radius: 3px; color: var(--gold); backdrop-filter: blur(4px);
}
.dash-spotlight__title { font-family: var(--font-title); font-size: 1.15rem; color: var(--ivory); margin: 0 0 .45rem; line-height: 1.25; }
.dash-spotlight__desc { color: var(--gray-soft); font-size: .84rem; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.dash-spotlight__meta { margin-top: .85rem; display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; font-size: .68rem; color: var(--gray); }
.dash-spotlight__meta span { display: inline-flex; align-items: center; gap: .4rem; }
.dash-spotlight__meta svg { width: 14px; height: 14px; stroke: var(--gold-deep); }

/* circular project progress */
.dash-rings { display: flex; justify-content: space-around; gap: .5rem; padding: .4rem 0 .2rem; flex-wrap: wrap; }
.dash-ring-item { text-align: center; min-width: 88px; }
.dash-ring-wrap {
  --pct: 0; --ring-color: var(--gold); position: relative; width: 82px; height: 82px; margin: 0 auto .65rem;
  border-radius: 50%; background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), rgba(201,168,106,.1) 0);
  display: grid; place-items: center; transition: --pct 1s var(--ease-lux);
}
.dash-ring-wrap::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line-soft); }
.dash-ring-wrap__val { position: relative; z-index: 1; font-family: var(--font-title); font-size: 1.35rem; color: var(--ivory); line-height: 1; }
.dash-ring-item span { font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gray-soft); }

/* vertical phases timeline */
.dash-phases-v { position: relative; padding-left: 1.6rem; }
.dash-phases-v::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.dash-phases-v__fill {
  position: absolute; left: 7px; top: 6px; width: 1px; height: 0; background: linear-gradient(to bottom, var(--gold-deep), var(--gold-soft));
  transition: height 1s var(--ease-lux); box-shadow: 0 0 8px rgba(201,168,106,.4);
}
.dash-phase-v { position: relative; display: flex; align-items: flex-start; gap: .85rem; padding-bottom: .85rem; }
.dash-phase-v:last-child { padding-bottom: 0; }
.dash-phase-v__dot {
  position: absolute; left: -1.6rem; top: 2px; width: 15px; height: 15px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel-2); display: grid; place-items: center; z-index: 1;
}
.dash-phase-v__dot svg { width: 9px; height: 9px; }
.dash-phase-v.is-completed .dash-phase-v__dot { border-color: var(--ok); background: var(--ok-soft); }
.dash-phase-v.is-completed .dash-phase-v__dot svg { stroke: var(--ok); }
.dash-phase-v.is-in_progress .dash-phase-v__dot { border-color: var(--gold); background: var(--warn-soft); animation: phasePulse 2.4s ease-in-out infinite; }
.dash-phase-v.is-in_progress .dash-phase-v__dot svg { stroke: var(--gold); }
.dash-phase-v__name { font-family: var(--font-title); font-size: .88rem; color: var(--ivory-dim); line-height: 1.2; }
.dash-phase-v.is-completed .dash-phase-v__name { color: var(--ivory); }
.dash-phase-v.is-in_progress .dash-phase-v__name { color: var(--gold-soft); }
.dash-phase-v__state { font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gray); margin-top: .2rem; }

/* weather card */
.dash-weather { display: flex; align-items: center; gap: 1rem; }
.dash-weather__ic {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; background: rgba(201,168,106,.06); flex: none;
}
.dash-weather__ic svg { width: 24px; height: 24px; stroke: var(--gold); }
.dash-weather__temp { font-family: var(--font-title); font-size: 1.6rem; color: var(--ivory); line-height: 1; }
.dash-weather__label { font-size: .78rem; color: var(--gray-soft); margin-top: .25rem; line-height: 1.45; }
.dash-weather__suit { display: inline-flex; align-items: center; gap: .35rem; margin-top: .45rem; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 20px; border: 1px solid; }
.dash-weather__suit--ok { color: var(--ok); border-color: rgba(132,168,120,.4); background: var(--ok-soft); }
.dash-weather__suit--warn { color: var(--late); border-color: rgba(176,106,94,.4); background: var(--late-soft); }

/* work + next step cards */
.dash-work-list, .dash-next-body { display: flex; flex-direction: column; gap: .65rem; }
.dash-work-item {
  display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem;
  background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 4px;
  transition: border-color var(--dur-med) var(--ease-out);
  text-decoration: none; color: inherit; cursor: pointer;
}
.dash-work-item:hover { border-color: rgba(201,168,106,.3); }
.dash-work-item svg { width: 16px; height: 16px; stroke: var(--gold); flex: none; }
.dash-work-item__text { font-size: .84rem; color: var(--ivory-dim); line-height: 1.4; }
.dash-work-item__proj { font-size: .62rem; color: var(--gray); margin-top: .15rem; letter-spacing: .06em; }
.dash-next-step { font-family: var(--font-title); font-size: 1.35rem; color: var(--gold-soft); margin: 0 0 .5rem; line-height: 1.2; }
.dash-next-date { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--gray-soft); margin-top: .85rem; padding-top: .85rem; border-top: 1px solid var(--line-soft); }
.dash-next-date svg { width: 15px; height: 15px; stroke: var(--gold-deep); }

/* dashboard activity feed */
.dash-act { display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--line-soft); align-items: flex-start; }
.dash-act:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-act__ic {
  width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(201,168,106,.05); display: grid; place-items: center;
}
.dash-act__ic svg { width: 15px; height: 15px; stroke: var(--gold); }
.dash-act__text { font-size: .86rem; color: var(--ivory-dim); line-height: 1.5; }
.dash-act__text strong { color: var(--ivory); font-weight: 500; }
.dash-act__time { font-size: .64rem; color: var(--gray); margin-top: .25rem; }

/* Lucide baseline in dashboard */
.dash svg { stroke-width: 1.5; }

@media (max-width: 1100px) {
  .dash-layout { grid-template-columns: 1fr; }
  .dash-spotlight { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-duo { grid-template-columns: 1fr; }
  .dash-welcome__date { text-align: left; width: 100%; }
}
@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr; }
  .dash-proj { flex-wrap: wrap; }
  .dash-proj__thumb { width: 100%; height: 120px; }
}

/* ---------- modal ---------- */
.modal-veil { position: fixed; inset: 0; z-index: 400; background: rgba(5,4,3,.7); backdrop-filter: blur(6px); display: none; align-items: flex-start; justify-content: center; overflow-y: auto; padding: 4vh 1rem; }
.modal-veil.is-open { display: flex; animation: veilIn var(--dur-med) var(--ease-out); }
@keyframes veilIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: clamp(1.4rem, 3vw, 2rem); margin: auto 0; box-shadow: 0 40px 90px -30px rgba(0,0,0,.85); animation: modalIn var(--dur-slow) var(--ease-lux) backwards; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
.modal--wide { max-width: 760px; }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.modal__head h3 { font-family: var(--font-title); font-weight: 500; font-size: 1.35rem; margin: 0; }
.modal__close { background: none; border: 0; color: var(--gray-soft); font-size: 1.1rem; cursor: pointer; transition: color .3s; padding: .3rem; }
.modal__close:hover { color: var(--gold); }
.modal__actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: 1.4rem; }

/* ---------- activity feed (admin) ---------- */
.act-list { display: flex; flex-direction: column; }
.act { display: flex; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
.act__ic { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--gold); font-size: .76rem; }
.act__text { font-size: .86rem; color: var(--ivory-dim); line-height: 1.5; }
.act__time { font-size: .64rem; color: var(--gray); margin-top: .25rem; letter-spacing: .06em; }

/* ---------- misc ---------- */
.empty { padding: 2.8rem 1.2rem; text-align: center; color: var(--gray); font-size: .86rem; border: 1px dashed rgba(201,168,106,.22); border-radius: 6px; line-height: 1.7; background: radial-gradient(60% 80% at 50% 0%, rgba(201,168,106,.03), transparent); }
.empty svg { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto .9rem; stroke: var(--gold-deep); padding: .9rem; border: 1px solid var(--line); border-radius: 50%; background: rgba(201,168,106,.05); box-sizing: content-box; }
.muted { color: var(--gray); }
.gold-text { color: var(--gold); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 1.6rem; }
.hidden { display: none !important; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(5,4,3,.92); display: none; align-items: center; justify-content: center; padding: 2rem; cursor: zoom-out; }
.lightbox.is-open { display: flex; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 88vh; object-fit: contain; border: 1px solid var(--line); border-radius: 3px; }

/* toast */
.toast {
  position: fixed; bottom: 1.6rem; left: 50%; transform: translate(-50%, 16px) scale(.97); z-index: 600;
  display: flex; align-items: center; gap: .7rem;
  background: rgba(20,16,11,.94); backdrop-filter: blur(10px);
  border: 1px solid rgba(201,168,106,.45); color: var(--ivory); border-radius: 6px;
  padding: .85rem 1.3rem; font-size: .84rem; opacity: 0; pointer-events: none;
  transition: opacity var(--dur-slow) var(--ease-lux), transform var(--dur-slow) var(--ease-lux);
  box-shadow: 0 20px 50px -16px rgba(0,0,0,.8); max-width: min(480px, 90vw); text-align: left; line-height: 1.5;
}
.toast i { color: var(--gold); flex: none; }
.toast.is-error i { color: var(--red); }
.toast.is-error { border-color: rgba(176,106,94,.5); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ============================================================
   PREMIUM MOTION SYSTEM
   ============================================================ */

/* staggered entrance — applied by JS via data-anim + --d delay */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
[data-anim] { animation: fadeUp var(--dur-slow) var(--ease-lux) both; animation-delay: var(--d, 0ms); will-change: transform, opacity; }

/* view / page transition (admin route changes, project switch) */
.view-anim { animation: fadeUp var(--dur-slow) var(--ease-lux) both; }

/* icon consistency (Font Awesome — same system as the main site) */
.panel__title h2 i, .doc-group__name i, .sidenav a i, .meta-cell__label i { width: 16px; text-align: center; }
.iconbtn:active { transform: scale(.92); }
.iconbtn { transition: border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out), transform var(--dur-fast) var(--ease-out), background var(--dur-med) var(--ease-out); }
.iconbtn:hover { background: rgba(201,168,106,.06); }

/* feed photos: gentle lift */
.feed-item__photos a { transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out); }
.feed-item__photos a:hover { transform: translateY(-3px); border-color: rgba(201,168,106,.45); box-shadow: 0 12px 26px -14px rgba(0,0,0,.8); }

/* feed timeline markers: soft glow on hover */
.feed-item { transition: opacity var(--dur-med) var(--ease-out); }
.feed-item::before { transition: box-shadow var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.feed-item:hover::before { box-shadow: 0 0 12px rgba(201,168,106,.7); transform: rotate(45deg) scale(1.15); }

/* activity rows */
.act { transition: background var(--dur-fast) var(--ease-out); border-radius: 4px; }
.act:hover { background: rgba(201,168,106,.025); }
.act__ic { background: rgba(201,168,106,.05); }

/* ---------- skeleton loaders ---------- */
.sk { position: relative; overflow: hidden; background: rgba(201,168,106,.06); border-radius: 4px; }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(221,212,196,.05) 50%, transparent 80%);
  transform: translateX(-100%); animation: skShimmer 1.5s var(--ease-out) infinite;
}
@keyframes skShimmer { to { transform: translateX(100%); } }
.sk--line { height: 12px; margin: .45rem 0; }
.sk--title { height: 22px; width: 45%; margin-bottom: 1rem; }
.sk--cell { height: 74px; border-radius: 4px; }
.sk--block { height: 120px; border-radius: 4px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: .9rem; }
.sk-wrap { padding: .2rem 0; }

/* ---------- focus visibility (keyboard) ---------- */
:focus-visible { outline: 1px solid rgba(201,168,106,.7); outline-offset: 2px; border-radius: 2px; }
.btn-gold:focus-visible { outline-offset: 3px; }

/* ---------- number rendering ---------- */
.progress-top__pct, .meta-cell__value, .tab__count, .iconbtn__badge { font-variant-numeric: tabular-nums; }

/* ---------- reduced motion: keep everything usable, remove motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-anim], .view-anim { animation: none !important; opacity: 1 !important; transform: none !important; }
  .progress-rail__fill::after, .sk::after { animation: none !important; }
  .phase.is-in_progress .phase__dot { animation: none !important; }
}
