/* ============================================================
   APP-SHELL.CSS — shared styles for all 3 portal shells
   (app-staff, app-klien, app-mitra)
   Soft Material × Liquid Glass · mobile-first
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === LOADING SPLASH ============================ */
#appLoading {
  position: fixed; inset: 0;
  background: var(--background);
  display: flex; flex-direction: column; gap: 16px;
  align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 320ms var(--ease-smooth);
}
#appLoading.hide { opacity: 0; pointer-events: none; }
.splash-logo {
  width: 64px; height: 64px;
  border-radius: 22px;
  background: var(--foreground);
  color: var(--primary-foreground);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 24px;
  box-shadow: var(--neu-out);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.94); opacity: 0.7; }
}
.splash-text { font-size: 12px; color: var(--foreground-muted); letter-spacing: 0.06em; text-transform: uppercase; }

/* === APP SHELL ================================== */
.app { min-height: 100dvh; padding-bottom: 96px; }
@media (min-width: 1024px) {
  .app {
    padding-bottom: 0;
    padding-left: 88px;          /* reserve space for fixed rail */
  }
}

/* === SIDE RAIL (desktop) ========================= */
/* position:fixed → bulletproof, glued to viewport, immune to any parent scroll context */
.rail { display: none; }
@media (min-width: 1024px) {
  .rail {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 24px 0;
    position: fixed; left: 0; top: 0;
    width: 88px; height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--surface);
    box-shadow: var(--neu-out-sm);
    z-index: 50;
  }
  .rail-logo {
    width: 48px; height: 48px;
    border-radius: var(--radius-pill);
    background: var(--foreground); color: var(--primary-foreground);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px;
    box-shadow: var(--neu-out-sm);
    margin-bottom: 12px;
  }
  .rail-btn {
    width: 56px; height: 56px;
    border-radius: var(--radius-pill);
    background: var(--surface); box-shadow: var(--neu-out-sm);
    border: none; cursor: pointer;
    color: var(--foreground-muted);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
  }
  .rail-btn:hover { transform: translateY(-2px); color: var(--foreground); }
  .rail-btn.active { background: var(--foreground); color: var(--primary-foreground); box-shadow: var(--neu-in-sm); }
  .rail-spacer { flex: 1; }
  .rail-bottom {
    display: flex; flex-direction: column; gap: 10px;
    padding-bottom: 12px;
  }
}

/* === MAIN ======================================= */
.main { padding: 20px 16px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
@media (min-width: 768px) { .main { padding: 32px 32px 40px; } }

/* === HEADER ===================================== */
.header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 12px;
}
.header-title { font-size: 28px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.header-title strong { font-weight: 600; }
.header-sub { color: var(--foreground-muted); font-size: 13px; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--neu-out-sm);
  border: none; cursor: pointer;
  color: var(--foreground);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  position: relative;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: translateY(0); box-shadow: var(--neu-in-sm); }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  background: var(--bauhaus-red); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  line-height: 1;
}

.avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--neu-out-sm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: var(--foreground); font-size: 15px;
  cursor: pointer;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* === SEARCH ===================================== */
.search { position: relative; margin-bottom: 16px; }
.search input {
  width: 100%; height: 48px; padding: 0 18px 0 46px;
  border: none; background: var(--surface);
  border-radius: var(--radius-pill);
  color: var(--foreground); font-family: inherit; font-size: 15px;
  box-shadow: var(--neu-in); outline: none;
  transition: var(--transition);
}
.search input:focus { box-shadow: var(--neu-in), 0 0 0 3px rgba(26,25,22,0.08); }
.search svg { position: absolute; top: 50%; left: 16px; transform: translateY(-50%); color: var(--foreground-muted); }

/* === FILTER CHIPS / SUB-SWITCHER ================ */
.filters {
  display: flex; gap: 8px; overflow-x: auto;
  margin: 0 -16px 18px; padding: 0 16px 4px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; padding: 9px 16px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--neu-out-sm); border: none;
  color: var(--foreground-muted); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.chip:hover { transform: translateY(-1px); }
.chip.active { background: var(--foreground); color: var(--primary-foreground); box-shadow: var(--neu-in-sm); }
.chip-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* === SECTION =================================== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 6px 0 10px; padding: 0 4px;
}
.section-title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--foreground-muted); }
.section-link { font-size: 12px; color: var(--foreground); font-weight: 500; text-decoration: none; cursor: pointer; }

/* === PROJECT CARD (the "coin") ================== */
.projects { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 768px) { .projects { grid-template-columns: 1fr 1fr; gap: 14px; } }
@media (min-width: 1200px) { .projects { grid-template-columns: 1fr 1fr 1fr; } }

.pcard {
  background: var(--surface); border-radius: var(--radius-card);
  box-shadow: var(--neu-out); padding: 18px;
  cursor: pointer;
  transition: transform 200ms var(--ease-spring), box-shadow var(--transition);
  position: relative; overflow: hidden;
}
.pcard:hover { transform: translateY(-3px); }
.pcard:active { transform: translateY(-1px) scale(0.99); }

.pcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pcard-id { font-family: var(--font-mono); font-size: 11px; color: var(--foreground-subtle); letter-spacing: 0.04em; margin-bottom: 4px; text-transform: uppercase; }
.pcard-name { font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--foreground); }
.pcard-cat {
  flex-shrink: 0; width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  box-shadow: var(--neu-out-sm); letter-spacing: 0.04em;
}
.pcard-cat.cat-design { background: var(--bauhaus-purple); }
.pcard-cat.cat-construction { background: var(--bauhaus-yellow); color: #2A2010; }
.pcard-cat.cat-supervision { background: var(--bauhaus-blue); }

.pcard-spark { margin: 6px 0 14px; height: 36px; position: relative; }
.pcard-spark svg { width: 100%; height: 100%; display: block; }

.pcard-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-progress { display: flex; flex-direction: column; }
.pcard-pct { font-size: 22px; font-weight: 300; line-height: 1; color: var(--foreground); letter-spacing: -0.02em; }
.pcard-pct-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--foreground-subtle); margin-top: 4px; }
.pcard-status {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--neu-in-sm);
  font-size: 11px; font-weight: 500; color: var(--foreground-muted);
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,0.04); }
.status-dot.ok { background: var(--bauhaus-green); }
.status-dot.warn { background: var(--bauhaus-yellow); }
.status-dot.danger { background: var(--bauhaus-red); }
.status-dot.idle { background: var(--foreground-subtle); }

.pcard-meta {
  display: flex; gap: 12px; margin-top: 14px; padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 11px; color: var(--foreground-muted);
}
.pcard-meta-item { display: flex; align-items: center; gap: 4px; }

.empty-state {
  grid-column: 1/-1; text-align: center; padding: 60px 20px;
  color: var(--foreground-muted); font-size: 13px;
}

/* === COCKPIT BOTTOM SHEET ======================= */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,18,15,0.45); backdrop-filter: blur(6px);
  z-index: 90; opacity: 0; pointer-events: none;
  transition: opacity 240ms var(--ease-smooth);
}
.sheet-backdrop.show { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--glass-bg-deep);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 28px 28px 0 0;
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -16px 60px rgba(0,0,0,0.18);
  z-index: 100; max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 320ms var(--ease-spring);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.sheet.show { transform: translateY(0); }
@media (min-width: 768px) {
  .sheet {
    left: 50%; right: auto; width: min(700px, 92vw);
    transform: translate(-50%, 100%);
    bottom: 24px; border-radius: 28px; max-height: 88dvh;
  }
  .sheet.show { transform: translate(-50%, 0); }
}

.sheet-handle { width: 40px; height: 4px; background: var(--foreground-subtle); border-radius: 4px; margin: 12px auto 0; opacity: 0.5; }
.sheet-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: var(--radius-pill); border: none;
  background: var(--surface); box-shadow: var(--neu-out-sm);
  cursor: pointer; color: var(--foreground);
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}

.cockpit-hero { padding: 28px 22px 22px; position: relative; }
.cockpit-hero-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.cockpit-cat {
  width: 56px; height: 56px; border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  box-shadow: var(--neu-out-sm); flex-shrink: 0; letter-spacing: 0.04em;
}
.cockpit-id { font-family: var(--font-mono); font-size: 12px; color: var(--foreground-subtle); letter-spacing: 0.04em; text-transform: uppercase; }
.cockpit-name { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; margin-top: 4px; }
.cockpit-client { font-size: 13px; color: var(--foreground-muted); margin-top: 4px; }

.cockpit-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.cstat { background: var(--surface); box-shadow: var(--neu-out-sm); border-radius: var(--radius-md); padding: 12px 10px; text-align: center; }
.cstat-val { font-size: 20px; font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.cstat-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--foreground-subtle); margin-top: 6px; }

.cockpit-section-title { padding: 0 22px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--foreground-muted); margin: 6px 0 10px; }
.cockpit-tabs { display: flex; gap: 6px; padding: 0 16px; margin-bottom: 14px; }
.cockpit-tab {
  flex: 1; padding: 10px 14px;
  border-radius: var(--radius-pill); border: none;
  background: var(--surface); box-shadow: var(--neu-out-sm);
  color: var(--foreground-muted); font: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
}
.cockpit-tab.active { background: var(--foreground); color: var(--primary-foreground); box-shadow: var(--neu-in-sm); }
.cockpit-pane { display: none; }
.cockpit-pane.active { display: block; }

.tools { padding: 0 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 600px) { .tools { grid-template-columns: 1fr 1fr 1fr; } }
.tool {
  background: var(--surface); box-shadow: var(--neu-out-sm);
  border-radius: var(--radius-lg); padding: 16px 14px;
  cursor: pointer; transition: var(--transition);
  text-align: left; border: none; color: var(--foreground); font: inherit;
  display: flex; flex-direction: column; gap: 8px; min-height: 96px;
  position: relative; text-decoration: none;
}
.tool:hover { transform: translateY(-2px); }
.tool-ico {
  width: 36px; height: 36px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--neu-in-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--foreground);
}
.tool-name { font-size: 13px; font-weight: 600; line-height: 1.2; }
.tool-meta { font-size: 10px; color: var(--foreground-subtle); margin-top: auto; }
.tool-badge {
  position: absolute; top: 12px; right: 12px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--bauhaus-red); color: #fff;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.activity { padding: 0 22px 24px; }
.activity-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bauhaus-blue); margin-top: 6px; flex-shrink: 0; }
.activity-text { font-size: 13px; line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--foreground-subtle); margin-top: 2px; }

/* === BOTTOM NAV (mobile) ========================= */
.botnav {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  z-index: 80; display: flex; gap: 6px; padding: 8px;
  background: var(--glass-bg-deep);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0));
}
@media (min-width: 1024px) { .botnav { display: none; } }
.botnav-btn {
  flex: 1; height: 52px; border: none; background: transparent;
  color: var(--foreground-muted); border-radius: var(--radius-pill);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  font: inherit; font-size: 9px; font-weight: 500;
  transition: var(--transition); padding: 0 4px;
}
.botnav-btn.active { background: var(--foreground); color: var(--primary-foreground); }
.botnav-btn svg { width: 18px; height: 18px; }

/* === VIEW SWITCHING ============================= */
.view { display: none; animation: fadeIn 240ms var(--ease-smooth); }
.view.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === HOME COMPONENTS ============================ */
.home-hero {
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 22px; margin-bottom: 14px;
  position: relative; overflow: hidden;
  isolation: isolate; /* prevent ::before bleed past rounded corners on iOS Safari */
}
.home-hero::before {
  content: ''; position: absolute;
  inset: -50% -20% auto auto; width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,46,0.25), transparent 65%);
  pointer-events: none;
}
.home-greet { font-size: 13px; color: var(--foreground-muted); margin-bottom: 4px; }
.home-name { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.home-name strong { font-weight: 600; }
.home-sub { font-size: 12px; color: var(--foreground-muted); margin-top: 8px; }

.home-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 600px) { .home-stats { grid-template-columns: repeat(4, 1fr); } }
.hstat { background: var(--surface); box-shadow: var(--neu-out-sm); border-radius: var(--radius-md); padding: 12px 14px; }
.hstat-val { font-size: 22px; font-weight: 300; letter-spacing: -0.02em; line-height: 1; }
.hstat-val .unit { font-size: 12px; opacity: 0.5; margin-left: 2px; }
.hstat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--foreground-muted); margin-top: 6px; }
.hstat-trend { font-size: 10px; margin-top: 4px; }
.hstat-trend.up { color: var(--bauhaus-green); }
.hstat-trend.down { color: var(--bauhaus-red); }
.hstat-trend.neutral { color: var(--foreground-subtle); }

.home-card { background: var(--surface); box-shadow: var(--neu-out); border-radius: var(--radius-card); padding: 18px; margin-bottom: 14px; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.home-card-title { font-size: 14px; font-weight: 600; }
.home-card-link { font-size: 11px; color: var(--foreground-muted); text-decoration: none; cursor: pointer; }
.home-list { display: flex; flex-direction: column; gap: 12px; }
.home-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
}
.home-item:last-child { border-bottom: none; }
.home-item-ico {
  width: 32px; height: 32px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--neu-in-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: var(--foreground);
}
.home-item-text { flex: 1; min-width: 0; }
.home-item-title { font-size: 13px; font-weight: 500; line-height: 1.3; }
.home-item-meta { font-size: 11px; color: var(--foreground-subtle); margin-top: 3px; }
.home-item-action {
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--neu-out-sm);
  border: none; font: inherit; font-size: 11px; font-weight: 500;
  color: var(--foreground); cursor: pointer; flex-shrink: 0;
  text-decoration: none;
}

.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 600px) { .quick-grid { grid-template-columns: repeat(4, 1fr); } }
.quick-btn {
  padding: 14px 14px;
  border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--neu-out-sm);
  border: none; cursor: pointer; font: inherit;
  color: var(--foreground); text-align: left;
  display: flex; flex-direction: column; gap: 6px;
  transition: var(--transition); text-decoration: none;
}
.quick-btn:hover { transform: translateY(-2px); }
.quick-btn-ico { font-size: 22px; }
.quick-btn-label { font-size: 12px; font-weight: 600; }

.cta-big {
  background: var(--foreground); color: var(--primary-foreground);
  border-radius: var(--radius-card);
  padding: 22px;
  display: flex; align-items: center; gap: 16px;
  cursor: pointer; border: none;
  width: 100%; text-align: left;
  box-shadow: var(--neu-out);
  transition: var(--transition);
  margin-bottom: 14px;
  font: inherit; text-decoration: none;
}
.cta-big:hover { transform: translateY(-2px); }
.cta-big-ico {
  width: 56px; height: 56px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 24px;
}
.cta-big-text { flex: 1; }
.cta-big-title { font-size: 17px; font-weight: 600; line-height: 1.2; }
.cta-big-sub { font-size: 12px; opacity: 0.7; margin-top: 4px; }
.cta-big-arrow { font-size: 22px; opacity: 0.6; }

/* === WORKSPACE TILES ============================ */
.ws-section { margin-bottom: 26px; }
.ws-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 600px) { .ws-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 900px) { .ws-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.ws-tile {
  background: var(--surface); box-shadow: var(--neu-out-sm);
  border-radius: var(--radius-lg); padding: 18px 16px;
  cursor: pointer; border: none; color: var(--foreground); font: inherit;
  text-align: left; transition: var(--transition);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 110px; text-decoration: none;
  position: relative;
}
.ws-tile:hover { transform: translateY(-2px); }
.ws-tile[data-locked="true"] { opacity: 0.55; cursor: not-allowed; }
.ws-tile[data-locked="true"]::after {
  content: '🔒'; position: absolute; top: 10px; right: 10px; font-size: 12px;
}
.ws-tile-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--bauhaus-yellow); color: #2A2010;
  text-transform: uppercase;
}
.ws-tile-tag.soon { background: var(--surface-2); color: var(--foreground-muted); box-shadow: var(--neu-in-sm); }
.ws-ico {
  width: 40px; height: 40px; border-radius: var(--radius-pill);
  box-shadow: var(--neu-in-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.ws-name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.ws-desc { font-size: 11px; color: var(--foreground-muted); line-height: 1.3; }

/* === OSMORPH PANEL ============================== */
.osmo-hero {
  background: linear-gradient(135deg, #1A1916 0%, #2A2925 100%);
  color: #F5F1EA; border-radius: var(--radius-card);
  padding: 26px 22px; margin-bottom: 16px;
  position: relative; overflow: hidden;
  box-shadow: var(--neu-out);
}
.osmo-hero::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(212, 168, 46, 0.4), transparent 60%);
  pointer-events: none;
}
.osmo-hero-title { font-size: 22px; font-weight: 300; letter-spacing: -0.01em; line-height: 1.2; position: relative; }
.osmo-hero-title strong { font-weight: 700; }
.osmo-hero-sub { font-size: 13px; opacity: 0.7; margin-top: 6px; position: relative; }
.osmo-hero-cta {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: rgba(245,241,234,0.12);
  border: 1px solid rgba(245,241,234,0.18);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-pill);
  color: #F5F1EA; font: inherit; font-size: 12px; font-weight: 500;
  cursor: pointer; text-decoration: none;
  position: relative;
}

.article-card {
  background: var(--surface); box-shadow: var(--neu-out-sm);
  border-radius: var(--radius-lg); padding: 14px;
  cursor: pointer; transition: var(--transition);
  margin-bottom: 10px; display: flex; gap: 14px; text-decoration: none; color: inherit;
}
.article-card:hover { transform: translateY(-2px); }
.article-thumb {
  width: 80px; height: 80px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--bauhaus-purple), var(--bauhaus-blue));
  flex-shrink: 0;
}
.article-card:nth-child(2) .article-thumb { background: linear-gradient(135deg, var(--bauhaus-yellow), var(--bauhaus-red)); }
.article-card:nth-child(3) .article-thumb { background: linear-gradient(135deg, var(--bauhaus-green), var(--bauhaus-blue)); }
.article-tag {
  display: inline-block; padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--surface); box-shadow: var(--neu-in-sm);
  color: var(--foreground-muted); margin-bottom: 4px;
}
.article-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.article-meta { font-size: 11px; color: var(--foreground-subtle); margin-top: 4px; }

.portfolio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 600px) { .portfolio-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 900px) { .portfolio-grid { grid-template-columns: 1fr 1fr 1fr 1fr; } }
.portfolio-card {
  aspect-ratio: 4/5; border-radius: var(--radius-lg);
  box-shadow: var(--neu-out-sm);
  background: linear-gradient(160deg, var(--bauhaus-purple), var(--bauhaus-blue));
  cursor: pointer; transition: var(--transition);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px; color: #fff; text-decoration: none;
}
.portfolio-card:hover { transform: translateY(-2px); }
.portfolio-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.55));
  pointer-events: none;
}
.portfolio-card > * { position: relative; z-index: 1; }
.portfolio-card:nth-child(2) { background: linear-gradient(160deg, var(--bauhaus-yellow), var(--bauhaus-red)); }
.portfolio-card:nth-child(3) { background: linear-gradient(160deg, var(--bauhaus-green), var(--bauhaus-blue)); }
.portfolio-card:nth-child(4) { background: linear-gradient(160deg, var(--bauhaus-red), var(--bauhaus-purple)); }
.portfolio-card:nth-child(5) { background: linear-gradient(160deg, var(--bauhaus-blue), var(--bauhaus-yellow)); }
.portfolio-card:nth-child(6) { background: linear-gradient(160deg, var(--bauhaus-purple), var(--bauhaus-green)); }
.portfolio-cat { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.portfolio-name { font-size: 13px; font-weight: 600; line-height: 1.2; margin-top: 2px; }

/* === SKELETON =================================== */
.skel-card {
  background: var(--surface); border-radius: var(--radius-card);
  box-shadow: var(--neu-out); padding: 18px;
  height: 220px;
  background-image: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* === PAGE-MODULE CHROME (migrated legacy modules) === */
.m-page { max-width: 1280px; margin: 0 auto; padding: 24px 16px 60px; }
@media (min-width: 768px) { .m-page { padding: 32px 32px 60px; } }

.m-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px; gap: 12px; flex-wrap: wrap;
}
.m-back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--neu-out-sm);
  color: var(--foreground); text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: var(--transition); border: none; font-family: inherit; cursor: pointer;
}
.m-back:hover { transform: translateY(-1px); }
.m-title-wrap h1 {
  font-size: 26px; font-weight: 300; letter-spacing: -0.02em;
  line-height: 1.2; margin: 0;
}
.m-title-wrap h1 strong { font-weight: 600; }
.m-title-wrap .m-sub { font-size: 12px; color: var(--foreground-muted); margin-top: 2px; }
.m-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.m-page-btn {
  padding: 10px 18px; border-radius: var(--radius-pill);
  border: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 500;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  box-shadow: var(--neu-out-sm);
}
.m-page-btn:hover:not(:disabled) { transform: translateY(-1px); }
.m-page-btn-primary { background: var(--foreground); color: var(--primary-foreground); }
.m-page-btn-secondary { background: var(--surface); color: var(--foreground); }
.m-page-btn-danger { background: var(--bauhaus-red); color: #fff; }

/* Office hero (for dashboard-* offices) */
.office-hero {
  border-radius: var(--radius-card);
  padding: 28px 26px; margin-bottom: 18px;
  position: relative; overflow: hidden;
  isolation: isolate;
  box-shadow: var(--neu-out);
  color: #F5F1EA;
}
.office-hero::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(212, 168, 46, 0.3), transparent 60%);
  pointer-events: none;
}
.office-hero.design { background: linear-gradient(135deg, #7A5A82 0%, #5C3F62 100%); }
.office-hero.construction { background: linear-gradient(135deg, #C4912A 0%, #8B6420 100%); }
.office-hero.supervision { background: linear-gradient(135deg, #3F5C7C 0%, #2A4060 100%); }

.office-hero-tag { font-size: 11px; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.1em; position: relative; }
.office-hero-title { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; line-height: 1.2; margin-top: 10px; position: relative; }
.office-hero-title strong { font-weight: 700; }
.office-hero-sub { font-size: 13px; opacity: 0.8; margin-top: 8px; line-height: 1.5; max-width: 600px; position: relative; }

/* Finance KPI panel (used in dashboards) */
.fin-panel {
  background: linear-gradient(135deg, #1A1916 0%, #2A2925 100%);
  color: #F5F1EA;
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 18px;
  position: relative; overflow: hidden;
  isolation: isolate;
  box-shadow: var(--neu-out);
}
.fin-panel::before {
  content: ''; position: absolute; top: -40%; right: -20%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(212, 168, 46, 0.35), transparent 60%);
  pointer-events: none;
}
.fin-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; position: relative; }
.fin-panel-label { font-size: 11px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.08em; }
.fin-panel-title { font-size: 17px; font-weight: 600; margin-top: 4px; }
.fin-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; position: relative;
}
@media (min-width: 768px) { .fin-grid { grid-template-columns: repeat(4, 1fr); } }
.fin-item-lbl { font-size: 10px; opacity: 0.65; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.fin-item-val { font-size: 22px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.fin-item-val.in { color: #7BA683; }
.fin-item-val.out { color: #D45F54; }
.fin-item-meta { font-size: 11px; opacity: 0.6; margin-top: 6px; }

.fin-detail-cta {
  margin-top: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  background: rgba(245,241,234,0.12);
  border: 1px solid rgba(245,241,234,0.2);
  border-radius: var(--radius-pill);
  color: #F5F1EA; font: inherit; font-size: 12px; font-weight: 500;
  text-decoration: none; cursor: pointer;
}

/* Section */
.m-section { margin-bottom: 26px; }
.m-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px; padding: 0 4px;
}
.m-section-title { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--foreground-muted); }
.m-section-link { font-size: 12px; color: var(--foreground); font-weight: 500; text-decoration: none; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
