/* NAMI WORKBENCH — task-first makeover based on real Jemke finance workflows */
:root {
  --nami-orange: #f28a38;
  --nami-gold: #f7c762;
  --nami-mint: #59c8b8;
  --nami-paper: #fff5df;
}

.topbar {
  padding-inline: 22px;
}
.tb-badge {
  letter-spacing: .08em;
}
.sidebar {
  padding: 16px 12px;
}
.sidebar::before {
  padding: 4px 11px 12px;
}
.nav-section {
  padding: 18px 12px 6px;
}
.nav-item {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
}
.nav-icon {
  width: 21px;
  font-size: 16px;
}

#view-home {
  position: relative;
  padding: 0;
  overflow-y: auto;
  background:
    radial-gradient(circle at 88% 6%, rgba(242,138,56,.13), transparent 30rem),
    linear-gradient(145deg, rgba(6,20,22,.98), rgba(5,15,17,.98));
}
.wb {
  position: relative;
  z-index: 1;
  width: min(1540px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 3.5vw, 58px);
}
.wb-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: end;
  gap: 28px;
  margin-bottom: 30px;
}
.wb-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  color: var(--nami-orange);
  font: 800 10px/1 var(--font-h);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.wb-kicker::before {
  content: "";
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, var(--nami-orange), var(--nami-gold));
}
.wb h1 {
  max-width: 920px;
  color: var(--nami-paper);
  font: 700 clamp(34px, 4.3vw, 68px)/.98 var(--font-h);
  letter-spacing: -.055em;
}
.wb h1 span {
  color: var(--nami-gold);
}
.wb-sub {
  max-width: 690px;
  margin-top: 16px;
  color: var(--fg2);
  font-size: clamp(14px, 1.25vw, 17px);
  line-height: 1.7;
}
.wb-safety {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(89,200,184,.2);
  border-radius: 14px;
  background: rgba(89,200,184,.055);
  color: rgba(231,248,239,.72);
  font-size: 12px;
  line-height: 1.55;
}
.wb-safety b {
  display: block;
  color: #ddfff8;
  font-size: 13px;
}
.wb-safety-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: rgba(89,200,184,.12);
  color: var(--nami-mint);
  font-weight: 800;
}

.wb-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.wb-action {
  position: relative;
  min-height: 238px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(247,199,98,.14);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(16,40,41,.94), rgba(6,23,25,.94));
  color: var(--fg);
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.wb-action::before {
  content: "";
  position: absolute;
  inset: auto -15% -55% 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--action-glow, rgba(242,138,56,.18)), transparent 68%);
  pointer-events: none;
}
.wb-action:hover {
  transform: translateY(-4px);
  border-color: rgba(247,199,98,.38);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.wb-action--invoice { --action-glow: rgba(89,200,184,.22); }
.wb-action--mail { --action-glow: rgba(247,199,98,.2); }
.wb-action-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}
.wb-action-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(247,199,98,.2);
  border-radius: 14px;
  background: rgba(247,199,98,.07);
  color: var(--nami-gold);
  font: 700 19px/1 var(--font-h);
}
.wb-action-num {
  color: rgba(255,245,223,.2);
  font: 700 11px/1 var(--font-h);
  letter-spacing: .12em;
}
.wb-action h2 {
  margin-bottom: 9px;
  color: var(--nami-paper);
  font: 700 clamp(20px, 2vw, 28px)/1.1 var(--font-h);
  letter-spacing: -.03em;
}
.wb-action p {
  max-width: 330px;
  color: var(--fg2);
  font-size: 13px;
  line-height: 1.6;
}
.wb-action-go {
  position: absolute;
  right: 22px;
  bottom: 20px;
  color: var(--nami-gold);
  font: 700 12px/1 var(--font-h);
}

.wb-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, .75fr);
  gap: 14px;
  margin-top: 14px;
}
.wb-panel {
  border: 1px solid rgba(247,199,98,.12);
  border-radius: 18px;
  background: rgba(8,28,30,.72);
}
.wb-command {
  padding: 22px;
}
.wb-panel-label {
  margin-bottom: 12px;
  color: rgba(247,199,98,.55);
  font: 800 9px/1 var(--font-h);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.wb-command-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wb-command-input {
  min-width: 0;
  flex: 1;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid rgba(247,199,98,.2);
  border-radius: 13px;
  outline: 0;
  background: rgba(2,14,16,.7);
  color: var(--nami-paper);
  font: 500 14px/1.4 var(--font-b);
}
.wb-command-input:focus {
  border-color: rgba(247,199,98,.6);
  box-shadow: 0 0 0 4px rgba(242,138,56,.08);
}
.wb-command-input::placeholder { color: var(--fg3); }
.wb-command-send {
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--nami-gold), var(--nami-orange));
  color: #201408;
  font: 800 12px/1 var(--font-h);
  cursor: pointer;
}
.wb-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}
.wb-shortcut {
  padding: 7px 10px;
  border: 1px solid rgba(247,199,98,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  color: var(--fg2);
  font: 600 11px/1 var(--font-b);
  cursor: pointer;
}
.wb-shortcut:hover { color: var(--nami-paper); border-color: rgba(247,199,98,.35); }
.wb-status {
  padding: 22px;
}
.wb-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.wb-kpi {
  min-width: 0;
  padding: 13px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.wb-kpi small {
  display: block;
  margin-bottom: 5px;
  color: var(--fg3);
  font-size: 10px;
}
.wb-kpi strong {
  display: block;
  overflow: hidden;
  color: var(--nami-paper);
  font: 700 17px/1.2 var(--font-h);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-kpi strong.warn { color: #ff9871; }
.wb-status-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  border: 0;
  border-radius: 10px;
  background: rgba(247,199,98,.07);
  color: var(--nami-gold);
  font: 700 11px/1 var(--font-b);
  cursor: pointer;
}

/* Chat becomes a clean working surface, not a second landing page. */
#view-chat {
  background: #071416;
}
#view-chat .chat-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.chat-contextbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px clamp(18px, 3vw, 42px);
  border-bottom: 1px solid rgba(247,199,98,.12);
  background: rgba(5,19,21,.92);
}
.chat-context-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-context-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247,199,98,.26);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(242,138,56,.18), rgba(89,200,184,.08));
  color: var(--nami-gold);
  font: 800 15px/1 var(--font-h);
}
.chat-contextbar h1 {
  color: var(--nami-paper);
  font: 700 15px/1.2 var(--font-h);
}
.chat-contextbar p {
  margin-top: 3px;
  color: var(--fg3);
  font-size: 10px;
}
.chat-context-actions { display: flex; gap: 8px; }
.chat-context-actions button {
  padding: 8px 11px;
  border: 1px solid rgba(247,199,98,.13);
  border-radius: 9px;
  background: rgba(255,255,255,.025);
  color: var(--fg2);
  font: 700 10px/1 var(--font-b);
  cursor: pointer;
}
.chat-context-actions button:hover { color: var(--nami-paper); border-color: rgba(247,199,98,.35); }
.chat-messages {
  width: min(980px, 100%);
  margin-inline: auto;
  padding: 30px clamp(18px, 3vw, 42px);
}
.chat-welcome {
  min-height: 300px;
  align-items: center;
  padding: 44px;
  background: linear-gradient(145deg, rgba(14,42,43,.95), rgba(6,22,24,.96));
  text-align: center;
}
.chat-welcome::before { content: "NAMI · ARBEITSCHAT"; }
.chat-welcome::after { display: none; }
.chat-welcome h2 {
  max-width: 620px;
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 48px);
  text-align: center;
}
.chat-welcome p {
  max-width: 600px;
  text-align: center;
}
.chat-input-wrap {
  padding: 14px clamp(18px, 3vw, 42px) 12px;
}
.chat-input-row {
  width: min(980px, 100%);
  margin-inline: auto;
}
.chat-hint {
  width: min(980px, 100%);
  margin-inline: auto;
}

/* Guided workflow sheet */
.wf-backdrop {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  background: rgba(0,8,9,.72);
  backdrop-filter: blur(12px);
}
.wf-backdrop.open { display: flex; }
.wf-sheet {
  width: min(860px, 100%);
  max-height: min(860px, calc(100vh - 32px));
  overflow-y: auto;
  border: 1px solid rgba(247,199,98,.25);
  border-radius: 24px;
  background: linear-gradient(155deg, #102b2d, #071719 68%);
  box-shadow: 0 40px 130px rgba(0,0,0,.6);
  animation: wf-in .22s ease-out;
}
@keyframes wf-in {
  from { transform: translateY(18px); opacity: 0; }
}
.wf-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 28px 20px;
  border-bottom: 1px solid rgba(247,199,98,.12);
  background: rgba(11,31,33,.96);
  backdrop-filter: blur(18px);
}
.wf-head small {
  display: block;
  margin-bottom: 7px;
  color: var(--nami-orange);
  font: 800 9px/1 var(--font-h);
  letter-spacing: .16em;
}
.wf-head h2 {
  color: var(--nami-paper);
  font: 700 25px/1.1 var(--font-h);
  letter-spacing: -.03em;
}
.wf-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border: 1px solid rgba(247,199,98,.16);
  border-radius: 11px;
  background: rgba(255,255,255,.03);
  color: var(--fg2);
  cursor: pointer;
}
.wf-body {
  padding: 25px 28px 30px;
}
.wf-note {
  margin-bottom: 22px;
  padding: 12px 14px;
  border-left: 3px solid var(--nami-mint);
  border-radius: 0 10px 10px 0;
  background: rgba(89,200,184,.06);
  color: var(--fg2);
  font-size: 12px;
}
.wf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.wf-field { min-width: 0; }
.wf-field.full { grid-column: 1 / -1; }
.wf-field label {
  display: block;
  margin-bottom: 7px;
  color: rgba(255,245,223,.7);
  font-size: 11px;
  font-weight: 700;
}
.wf-field label span {
  color: var(--fg3);
  font-weight: 500;
}
.wf-field input,
.wf-field textarea,
.wf-field select {
  width: 100%;
  min-height: 46px;
  padding: 12px 13px;
  border: 1px solid rgba(247,199,98,.16);
  border-radius: 11px;
  outline: 0;
  background: rgba(2,14,16,.65);
  color: var(--nami-paper);
  font: 500 13px/1.45 var(--font-b);
}
.wf-field textarea { min-height: 108px; resize: vertical; }
.wf-field input:focus,
.wf-field textarea:focus,
.wf-field select:focus {
  border-color: rgba(247,199,98,.56);
  box-shadow: 0 0 0 3px rgba(242,138,56,.07);
}
.wf-field input::placeholder,
.wf-field textarea::placeholder { color: rgba(244,233,207,.25); }
.wf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(247,199,98,.1);
}
.wf-footer p {
  max-width: 470px;
  color: var(--fg3);
  font-size: 10px;
  line-height: 1.5;
}
.wf-submit {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--nami-gold), var(--nami-orange));
  color: #211508;
  font: 800 12px/1 var(--font-h);
  white-space: nowrap;
  cursor: pointer;
}

@media (min-width: 801px) {
  :root { --sidebar: 238px; --topbar: 64px; }
}
@media (max-width: 1050px) {
  .wb-head { grid-template-columns: 1fr; }
  .wb-safety { max-width: 520px; }
  .wb-actions { grid-template-columns: 1fr 1fr; }
  .wb-action--mail { grid-column: 1 / -1; min-height: 190px; }
  .wb-lower { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  #view-home { padding-bottom: 68px; }
  .wb { padding: 24px 14px 28px; }
  .wb-head { gap: 18px; margin-bottom: 20px; }
  .wb h1 { font-size: 39px; }
  .wb-actions { grid-template-columns: 1fr; }
  .wb-action,
  .wb-action--mail { grid-column: auto; min-height: 190px; padding: 20px; }
  .wb-action-top { margin-bottom: 22px; }
  .wb-command-row { align-items: stretch; flex-direction: column; }
  .wb-command-send { width: 100%; }
  .chat-contextbar { padding: 11px 13px; }
  .chat-context-actions button:first-child { display: none; }
  .chat-contextbar p { display: none; }
  .wf-backdrop { padding: 0; }
  .wf-sheet {
    max-height: 94vh;
    border-radius: 22px 22px 0 0;
  }
  .wf-head { padding: 20px 18px 16px; }
  .wf-body { padding: 20px 18px 28px; }
  .wf-grid { grid-template-columns: 1fr; }
  .wf-field.full { grid-column: auto; }
  .wf-footer { align-items: stretch; flex-direction: column; }
  .wf-submit { width: 100%; }
}

#view-home::before {
  content: "";
  position: absolute;
  top: -2%;
  right: 0;
  width: min(56%, 780px);
  height: 66%;
  opacity: .13;
  background: url("/assets/nami/nami-finance-navigator-hero.png") 68% 26% / cover no-repeat;
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%, #000 75%, transparent 100%), linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  pointer-events: none;
}
