/* Hossam Nabil ERP — Quiet Luxury layer (beyond Tailwind) */

:root {
  --cream: #F5F5F7;
  --cream-deep: #ECECEF;
  --ink: #3A3A3C;
  --ink-soft: #6B6B6E;
  --gold: #C5A059;
  --gold-deep: #A8863F;
  --gold-mist: rgba(197, 160, 89, 0.14);
  --card: #FFFFFF;
  --line: rgba(58, 58, 60, 0.08);
  --terracotta: #9A5B3C;
  --sage: #5F7A62;
  --shadow: 0 10px 40px rgba(58, 58, 60, 0.06);
  --shadow-hover: 0 16px 48px rgba(58, 58, 60, 0.1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

html[dir="rtl"],
html[lang="ar"],
[dir="rtl"] body,
html[lang="ar"] body {
  font-family: "Cairo", "Tajawal", "Inter", sans-serif;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(58, 58, 60, 0.12);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.42rem 0.8rem;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease;
}
.lang-btn.is-on {
  background: linear-gradient(180deg, #C5A059 0%, #B38E4A 100%);
  color: #fff;
}
.lang-btn[data-set-lang="ar"] {
  font-family: "Cairo", "Tajawal", sans-serif;
  letter-spacing: 0;
}

[dir="rtl"] .sidebar {
  box-shadow: -8px 0 32px rgba(58, 58, 60, 0.08);
}
[dir="rtl"] .nav-item.active::before {
  left: auto;
  right: 0;
  border-radius: 99px 0 0 99px;
}
[dir="rtl"] .select-lux {
  background-position: left 12px center;
}
[dir="rtl"] .toast {
  right: auto;
  left: 1.5rem;
}
[dir="rtl"] .call-sheet {
  right: auto;
  left: 1.5rem;
}
[dir="rtl"] .uppercase {
  letter-spacing: 0.04em;
}
[dir="rtl"] .text-left { text-align: right; }
[dir="rtl"] .text-right { text-align: left; }
[dir="rtl"] th.text-left,
[dir="rtl"] td.text-left { text-align: right; }
[dir="rtl"] th.text-right,
[dir="rtl"] td.text-right { text-align: left; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(197, 160, 89, 0.35);
  border-radius: 99px;
}

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 70;
  text-align: center;
  padding: 0.52rem 1rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(90deg, #2c2c2e 0%, #C5A059 38%, #E4C58A 50%, #C5A059 62%, #2c2c2e 100%);
  background-size: 220% 100%;
  animation: demoShine 5s ease-in-out infinite;
  box-shadow:
    0 0 18px rgba(197, 160, 89, 0.45),
    0 0 40px rgba(197, 160, 89, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
@keyframes demoShine {
  0%, 100% {
    background-position: 0% 50%;
    box-shadow: 0 0 16px rgba(197, 160, 89, 0.35), 0 0 32px rgba(197, 160, 89, 0.16);
  }
  50% {
    background-position: 100% 50%;
    box-shadow: 0 0 28px rgba(197, 160, 89, 0.7), 0 0 56px rgba(197, 160, 89, 0.32);
  }
}
[dir="rtl"] .demo-banner { letter-spacing: 0.06em; }

.app-shell {
  min-height: calc(100vh - 38px);
}

.sidebar {
  background: linear-gradient(180deg, #2f2f31 0%, #3A3A3C 55%, #323234 100%);
  box-shadow: 8px 0 32px rgba(58, 58, 60, 0.08);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(245, 245, 247, 0.62);
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-item:hover {
  color: #F5F5F7;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
  color: #F5F5F7;
  background: rgba(197, 160, 89, 0.12);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 99px 99px 0;
  background: var(--gold);
}

.brand-mark {
  background: linear-gradient(145deg, #C5A059 0%, #A8863F 100%);
  box-shadow: 0 8px 20px rgba(197, 160, 89, 0.28);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.gold-hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.heat-cell {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.heat-cell:hover { transform: translateY(-2px); }

.heat-cell .heat-fill {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
}

.badge {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.timeline-rail {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) var(--progress, 40%), rgba(58, 58, 60, 0.12) var(--progress, 40%), rgba(58, 58, 60, 0.12) 100%);
}

.timeline-dot {
  box-shadow: 0 0 0 4px var(--cream);
}

.toast {
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.view-panel {
  display: none;
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.view-panel.active { display: block; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.progress-lux {
  background: rgba(58, 58, 60, 0.08);
}

.progress-lux > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #C5A059, #D4B87A);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.alert-leak {
  background: linear-gradient(90deg, rgba(154, 91, 60, 0.08), rgba(197, 160, 89, 0.08));
  border: 1px solid rgba(154, 91, 60, 0.18);
}

.btn-gold {
  background: linear-gradient(180deg, #C5A059 0%, #B38E4A 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(197, 160, 89, 0.28);
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(197, 160, 89, 0.38);
}

.btn-gold:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  border: 1px solid rgba(58, 58, 60, 0.12);
  background: #fff;
  transition: all 0.25s ease;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.select-lux {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23C5A059' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.mobile-overlay {
  background: rgba(58, 58, 60, 0.35);
  backdrop-filter: blur(6px);
}

/* Print / Executive Summary */
.print-banner { display: none; }

@media print {
  @page { margin: 14mm 12mm; size: A4 landscape; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  body { background: #fff !important; }

  .no-print,
  .sidebar,
  #mobileOverlay,
  .toast,
  header,
  .demo-banner,
  .lang-switch,
  .role-switch,
  .actpert-mark,
  #projectSelect,
  .btn-gold,
  .btn-ghost { display: none !important; }

  .print-banner { display: block !important; }

  #mainWrap {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .card {
    box-shadow: none !important;
    break-inside: avoid;
    transform: none !important;
  }

  .view-panel { display: none !important; animation: none !important; }
  .view-panel.active { display: block !important; }

  .demo-banner { display: none !important; }

  .app-shell { min-height: auto; display: block; }
  aside.sidebar { display: none !important; }
  .card:hover { transform: none !important; }
}

.vendor-card {
  cursor: pointer;
  text-align: left;
}
.vendor-card.is-active {
  border-color: rgba(197, 160, 89, 0.45);
  box-shadow: 0 12px 36px rgba(197, 160, 89, 0.14);
}

.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  inset: 0;
  background: rgba(58, 58, 60, 0.18);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.28s ease;
}
.switch .slider::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(58, 58, 60, 0.18);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.switch input:checked + .slider {
  background: linear-gradient(180deg, #C5A059 0%, #B38E4A 100%);
}
.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.ring-meter {
  transform: rotate(-90deg);
}
.ring-meter circle {
  fill: none;
  stroke-linecap: round;
}
.po-row {
  cursor: pointer;
  transition: opacity 0.3s ease, background 0.25s ease;
}
.po-row:hover { background: rgba(197, 160, 89, 0.05); }
.po-row.dim {
  opacity: 0.34;
}

.ar {
  font-family: "Cairo", "Noto Sans Arabic", "Inter", sans-serif;
  direction: rtl;
}

.billing-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  position: relative;
}
.billing-rail::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18px;
  height: 2px;
  background: linear-gradient(90deg, #C5A059, rgba(197, 160, 89, 0.25));
  z-index: 0;
}
.bill-node {
  position: relative;
  z-index: 1;
  text-align: center;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 0;
  color: inherit;
}
.bill-dot {
  width: 14px;
  height: 14px;
  margin: 12px auto 10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(58, 58, 60, 0.2);
  transition: all 0.28s ease;
}
.bill-node.is-done .bill-dot {
  background: #C5A059;
  border-color: #C5A059;
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.18);
}
.bill-node.is-due .bill-dot {
  background: #9A5B3C;
  border-color: #9A5B3C;
  box-shadow: 0 0 0 4px rgba(154, 91, 60, 0.16);
}
.bill-node.is-active {
  transform: translateY(-2px);
}
.bill-node.is-active .bill-card {
  border-color: rgba(197, 160, 89, 0.45);
  box-shadow: 0 10px 28px rgba(197, 160, 89, 0.12);
}

.cf-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: end;
}
.cf-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  height: 200px;
}
.cf-bar {
  width: 36px;
  border-radius: 10px 10px 4px 4px;
  min-height: 8px;
  transition: height 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.cf-bar.in {
  background: linear-gradient(180deg, #D4B87A 0%, #C5A059 100%);
  box-shadow: 0 8px 18px rgba(197, 160, 89, 0.28);
}
.cf-bar.out {
  background: linear-gradient(180deg, #4a4a4c 0%, #3A3A3C 100%);
}

@media (max-width: 900px) {
  .billing-rail {
    grid-template-columns: 1fr;
  }
  .billing-rail::before {
    display: none;
  }
  .bill-node { text-align: left; display: flex; gap: 12px; align-items: flex-start; }
  .bill-dot { margin: 6px 0 0; }
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.kanban-col {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(58, 58, 60, 0.06);
  border-radius: 1.25rem;
  padding: 0.85rem;
  min-width: 220px;
  min-height: 280px;
}
.kanban-card {
  background: #fff;
  border: 1px solid rgba(58, 58, 60, 0.06);
  border-radius: 1rem;
  padding: 0.9rem;
  margin-bottom: 0.7rem;
  box-shadow: 0 8px 24px rgba(58, 58, 60, 0.04);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(58, 58, 60, 0.08);
}
.mood-swatch {
  display: flex;
  height: 88px;
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}
.mood-swatch span { flex: 1; }
.mood-card.is-signed {
  box-shadow: 0 12px 36px rgba(197, 160, 89, 0.16);
  border-color: rgba(197, 160, 89, 0.4);
}
.co-row.held {
  background: rgba(154, 91, 60, 0.05);
}

.ops-map {
  position: relative;
  min-height: 280px;
  border-radius: 1.25rem;
  background:
    radial-gradient(ellipse at 28% 42%, rgba(197, 160, 89, 0.16), transparent 42%),
    radial-gradient(ellipse at 72% 58%, rgba(58, 58, 60, 0.08), transparent 40%),
    linear-gradient(160deg, #EFEDE8 0%, #F5F5F7 55%, #E8E6E1 100%);
  overflow: hidden;
}
.ops-map::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(197, 160, 89, 0.25);
  border-radius: 1rem;
  pointer-events: none;
}
.ops-pin {
  position: absolute;
  z-index: 1;
  transform: translate(-50%, -50%);
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
}
.ops-pin .pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #C5A059;
  box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.55);
  animation: pulse-pin 2.2s ease-out infinite;
}
.ops-pin.is-hq .pulse { background: #3A3A3C; box-shadow: 0 0 0 0 rgba(58, 58, 60, 0.35); }
.ops-pin .pin-label {
  margin-top: 6px;
  background: #fff;
  border-radius: 0.75rem;
  padding: 0.4rem 0.65rem;
  box-shadow: 0 8px 24px rgba(58, 58, 60, 0.08);
  min-width: 140px;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.ops-pin.is-active .pin-label {
  box-shadow: 0 12px 32px rgba(197, 160, 89, 0.22);
  outline: 1px solid rgba(197, 160, 89, 0.45);
}
@keyframes pulse-pin {
  0% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(197, 160, 89, 0); }
  100% { box-shadow: 0 0 0 0 rgba(197, 160, 89, 0); }
}

.liq-track {
  position: relative;
  height: 14px;
  border-radius: 99px;
  background: rgba(58, 58, 60, 0.08);
  overflow: hidden;
}
.liq-in {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #C5A059, #D4B87A);
}
.liq-out {
  position: absolute;
  inset: 3px auto 3px 0;
  border-radius: 99px;
  background: #3A3A3C;
  opacity: 0.55;
}

.call-sheet {
  transform: translateY(12px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.call-sheet.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1023px) {
  .sidebar {
    position: fixed;
    top: 38px;
    bottom: 0;
    inset-inline-start: 0;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0) !important; }
}

/* Site engineer field diary */
.attend-orb {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(58, 58, 60, 0.08);
  border: 2px solid rgba(58, 58, 60, 0.12);
  position: relative;
  flex-shrink: 0;
}
.attend-orb::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: rgba(58, 58, 60, 0.28);
}
.attend-orb.is-on {
  border-color: rgba(95, 122, 98, 0.45);
  box-shadow: 0 0 0 8px rgba(95, 122, 98, 0.08);
}
.attend-orb.is-on::after {
  background: #5F7A62;
  animation: attendPulse 1.8s ease-out infinite;
}
@keyframes attendPulse {
  0% { box-shadow: 0 0 0 0 rgba(95, 122, 98, 0.45); }
  100% { box-shadow: 0 0 0 14px rgba(95, 122, 98, 0); }
}

.chip,
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(58, 58, 60, 0.1);
  background: #fff;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.chip:has(input:checked),
.chip-btn.is-on {
  border-color: rgba(197, 160, 89, 0.55);
  background: rgba(197, 160, 89, 0.12);
  color: #8A6A2E;
}
.chip input { accent-color: #C5A059; }
.chip-btn { font-weight: 500; }

.field-lux {
  border: 1px solid rgba(58, 58, 60, 0.1);
  background: #fff;
  border-radius: 0.85rem;
  padding: 0.7rem 0.9rem;
  font-size: 0.875rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-lux:focus {
  border-color: rgba(197, 160, 89, 0.55);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}

.iss-row {
  border: 1px solid rgba(58, 58, 60, 0.08);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  background: #fff;
}
.iss-row.is-rain { border-color: rgba(90, 120, 150, 0.25); }
.iss-row.is-plant { border-color: rgba(154, 91, 60, 0.25); }
.iss-row.is-mat { border-color: rgba(197, 160, 89, 0.35); }

/* —— Actpert brand bar —— */
.actpert-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem 0.2rem;
}
.actpert-logo-sm,
.sidebar-logo,
.header-avatar {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(58, 58, 60, 0.12);
}
.sidebar-logo { width: 2.75rem; height: 2.75rem; }
.header-avatar { width: 2.5rem; height: 2.5rem; border-radius: 999px; }
.is-role-hidden { display: none !important; }
.grid:has(> .is-role-hidden) > article:not(.is-role-hidden) {
  grid-column: 1 / -1;
}
.actpert-glow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #C5A059;
  text-shadow:
    0 0 8px rgba(197, 160, 89, 0.55),
    0 0 22px rgba(197, 160, 89, 0.28);
  animation: actpertPulse 3.6s ease-in-out infinite;
}
[dir="rtl"] .actpert-glow { letter-spacing: 0.06em; }
@keyframes actpertPulse {
  0%, 100% {
    text-shadow: 0 0 8px rgba(197, 160, 89, 0.4), 0 0 18px rgba(197, 160, 89, 0.18);
    opacity: 0.88;
  }
  50% {
    text-shadow: 0 0 16px rgba(197, 160, 89, 0.85), 0 0 36px rgba(197, 160, 89, 0.4);
    opacity: 1;
  }
}

/* —— Role switcher —— */
.role-switch { position: relative; }
.role-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(197, 160, 89, 0.4);
  background: linear-gradient(180deg, #fff 0%, #fbf8f2 100%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(197, 160, 89, 0.12);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.role-switch-btn:hover,
.role-switch.is-open .role-switch-btn {
  border-color: rgba(197, 160, 89, 0.7);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
  background: rgba(197, 160, 89, 0.08);
}
.role-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  width: min(280px, 86vw);
  background: #fff;
  border: 1px solid rgba(58, 58, 60, 0.08);
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgba(58, 58, 60, 0.14);
  padding: 0.4rem;
  z-index: 60;
}
.role-menu button,
.role-menu a {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  border-radius: 0.75rem;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.role-menu button:hover,
.role-menu a:hover,
.role-menu button.is-current {
  background: rgba(197, 160, 89, 0.1);
}
.role-menu .role-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.15);
  color: #C5A059;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* —— Login gateway —— */
.login-body {
  min-height: 100vh;
  background: #F5F5F7;
  color: #3A3A3C;
  position: relative;
  overflow-x: hidden;
}
.login-aura {
  pointer-events: none;
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 15% 10%, rgba(197, 160, 89, 0.18), transparent 60%),
    radial-gradient(ellipse 40% 35% at 90% 80%, rgba(197, 160, 89, 0.12), transparent 55%),
    radial-gradient(ellipse 30% 30% at 50% 50%, rgba(58, 58, 60, 0.04), transparent 70%);
}
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 1.5rem 1.25rem;
  max-width: 1120px;
  margin: 0 auto;
}
.login-shell-center { max-width: 560px; }
.login-top-abs {
  display: flex;
  justify-content: flex-end;
}
.login-main-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
}
.login-card {
  width: 100%;
  background: #fff;
  border: 1px solid rgba(58, 58, 60, 0.08);
  border-radius: 1.6rem;
  padding: 2rem 1.75rem 1.6rem;
  box-shadow: 0 24px 60px rgba(58, 58, 60, 0.08);
  text-align: center;
}
.login-logo {
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border-radius: 1.35rem;
  margin: 0 auto;
  box-shadow: 0 12px 28px rgba(58, 58, 60, 0.12);
}
.login-mark { font-size: 11px; display: inline-block; }
.login-profiles { display: grid; gap: 0.7rem; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: start;
  background: #F5F5F7;
  border: 1px solid rgba(58, 58, 60, 0.06);
  border-radius: 1.1rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.profile-card:hover,
.profile-card:focus-visible {
  background: #fff;
  border-color: rgba(197, 160, 89, 0.45);
  box-shadow: 0 12px 28px rgba(197, 160, 89, 0.14);
  transform: translateY(-2px);
  outline: none;
}
.profile-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  color: #fff;
  background: #3A3A3C;
}
.profile-avatar.is-ceo { background: linear-gradient(145deg, #C5A059, #A8863F); }
.profile-avatar.is-fm { background: #3A3A3C; }
.profile-avatar.is-se { background: #5F7A62; }
.login-foot { padding-top: 1rem; }

/* —— Field feed —— */
.feed-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 900px) {
  .feed-grid { grid-template-columns: repeat(3, 1fr); }
}
.feed-card {
  overflow: hidden;
  border-radius: 1.15rem;
  border: 1px solid rgba(58, 58, 60, 0.08);
  background: #fff;
}
.feed-photo {
  height: 168px;
  background-size: cover;
  background-position: center;
  background-color: #ececef;
}
.feed-empty {
  grid-column: 1 / -1;
  padding: 2rem 1rem;
  text-align: center;
  color: rgba(58, 58, 60, 0.45);
  font-size: 0.875rem;
}
.upload-preview {
  height: 140px;
  border-radius: 1rem;
  border: 1px dashed rgba(197, 160, 89, 0.45);
  background: rgba(197, 160, 89, 0.06) center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(58, 58, 60, 0.45);
  font-size: 12px;
}

.is-scoped-out { display: none !important; }

.task-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 99px;
  background: rgba(58, 58, 60, 0.1);
  outline: none;
}
.task-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #C5A059;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.18);
}
