/* ================= FlowDeck ================= */
.fd-hero { padding-bottom: 100px; }
.fd-hero-inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 50px; align-items: center; }
.fd-hero .eyebrow::before { display: none; }
.fd-hero .eyebrow i { color: #9fbcff; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* Hero board */
.board-wrap { position: relative; width: 100%; max-width: 540px; margin-left: auto; padding: 20px 0; }
.board {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  padding: 16px;
  animation: boardFloat 8s ease-in-out infinite;
}
@keyframes boardFloat { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(0.5deg); } }
.board-top { display: flex; align-items: center; gap: 12px; padding: 2px 4px 14px; color: #fff; }
.board-top strong { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; }
.bt-dots { display: flex; gap: 6px; }
.bt-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.bt-dots i:nth-child(2) { background: #febc2e; } .bt-dots i:nth-child(3) { background: #28c840; }
.bt-avatars { margin-left: auto; display: flex; }
.bt-avatars b, .av {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: #fff;
  font-size: 0.62rem; font-weight: 700; font-family: var(--font-head);
  border: 2px solid var(--navy);
}
.bt-avatars b + b { margin-left: -8px; }
.bt-avatars b:nth-child(2) { background: linear-gradient(135deg, #12b76a, #0e9f5c); }
.bt-avatars b:nth-child(3) { background: linear-gradient(135deg, #f59e0b, #ea580c); }

.board-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bcol { border-radius: 14px; background: rgba(4, 10, 35, 0.45); padding: 10px; min-height: 290px; }
.bcol-head { display: flex; align-items: center; gap: 7px; font-size: 0.75rem; font-weight: 600; color: #c9d6ff; margin-bottom: 10px; font-family: var(--font-head); }
.bcol-head em { margin-left: auto; font-style: normal; font-size: 0.68rem; padding: 1px 7px; border-radius: 100px; background: rgba(255, 255, 255, 0.1); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.todo { background: #8fa3d9; } .dot.doing { background: #febc2e; } .dot.done { background: #28c840; }
.bcol-body { display: grid; gap: 8px; }
.kcard {
  padding: 10px 11px;
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 0.74rem; font-weight: 600; line-height: 1.35;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.5);
  will-change: transform;
}
.kcard .kc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.kcard .tag-s { font-size: 0.6rem; padding: 2px 7px; border-radius: 100px; font-weight: 600; }
.tag-s.high { background: #ffe4e6; color: #be123c; } .tag-s.med { background: #fff1e0; color: #c2410c; } .tag-s.low { background: var(--primary-50); color: var(--primary); }
.kcard .kc-meta b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 0.5rem; }
.bcol[data-col="2"] .kcard { opacity: 0.85; }
.bcol[data-col="2"] .kcard > span:first-child { text-decoration: line-through; text-decoration-color: rgba(7, 11, 26, 0.35); }
.kcard.lift { box-shadow: 0 18px 30px -10px rgba(0, 67, 209, 0.7); }

.fd-toast {
  position: absolute; right: -10px; bottom: 0;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 14px;
  background: #fff; color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(0.95);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease-back);
}
.fd-toast i { color: var(--success); font-size: 1.1rem; }
.fd-toast.show { opacity: 1; transform: none; }
.fd-chip {
  position: absolute; left: -16px; top: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  color: #fff; font-family: var(--font-head); font-weight: 500; font-size: 0.82rem;
  animation: fdBob 6s ease-in-out infinite;
}
.fd-chip i { color: #febc2e; }
@keyframes fdBob { 50% { translate: 0 -10px; } }

/* Views */
.views { max-width: 1000px; margin: 0 auto; }
.view-tabs {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  width: min(620px, 100%); margin: 0 auto 28px;
  padding: 6px; border-radius: 100px;
  background: var(--bg-soft); border: 1px solid var(--line);
}
.vt {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 10px; border: 0; background: none; cursor: pointer; border-radius: 100px;
  font-family: var(--font-head); font-weight: 600; font-size: 0.9rem; color: var(--muted);
  transition: color 0.3s; white-space: nowrap;
}
.vt.active { color: #fff; }
.vt-ink { position: absolute; top: 6px; bottom: 6px; left: 6px; width: calc((100% - 12px) / 4); border-radius: 100px; background: var(--grad); box-shadow: var(--shadow-glow); transition: transform 0.5s var(--ease-back); }

.view-stage {
  position: relative;
  min-height: 360px;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
}
.vpanel { display: none; }
.vpanel.active { display: block; animation: vIn 0.55s var(--ease); }
@keyframes vIn { from { opacity: 0; transform: translateY(16px) scale(0.99); } }

/* board view */
.vb-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.vb-col { display: grid; gap: 10px; align-content: start; padding: 14px; border-radius: 16px; background: var(--bg-soft); min-height: 290px; }
.vb-col b { font-family: var(--font-head); font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.vb-card {
  display: grid; gap: 10px;
  padding: 14px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.vpanel.active .vb-card { animation: cardDrop 0.6s var(--ease-back) both; }
.vpanel.active .vb-col:nth-child(2) .vb-card { animation-delay: 0.08s; }
.vpanel.active .vb-col:nth-child(3) .vb-card { animation-delay: 0.16s; }
.vpanel.active .vb-col:nth-child(4) .vb-card { animation-delay: 0.24s; }
@keyframes cardDrop { from { opacity: 0; transform: translateY(-20px) rotate(-3deg); } }
.vb-card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow); }
.vb-card.hot { border-color: var(--primary-200); box-shadow: 0 0 0 3px var(--primary-50); }
.vb-card .p { font-style: normal; justify-self: start; font-size: 0.7rem; padding: 3px 9px; border-radius: 100px; }
.p.high { background: #ffe4e6; color: #be123c; } .p.med { background: #fff1e0; color: #c2410c; } .p.low { background: var(--primary-50); color: var(--primary); } .p.ok { background: #dcfce7; color: #15803d; }

/* list view */
.vl { display: grid; gap: 6px; }
.vl-row { display: grid; grid-template-columns: 2fr 1.2fr 0.8fr 0.9fr; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 0.92rem; color: var(--ink-2); transition: background 0.25s; }
.vl-row:not(.head):hover { background: var(--bg-soft); }
.vl-row.head { font-family: var(--font-head); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); border-bottom: 1px solid var(--line); border-radius: 0; }
.vl-row span:first-child { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.vl-row span:first-child i { color: var(--primary); }
.vl-row span:nth-child(2) { display: flex; align-items: center; gap: 8px; }
.vl-row .av { width: 26px; height: 26px; border-color: #fff; }
.vpanel.active .vl-row:not(.head) { animation: rowIn 0.5s var(--ease) both; }
.vpanel.active .vl-row:nth-child(3) { animation-delay: 0.07s; } .vpanel.active .vl-row:nth-child(4) { animation-delay: 0.14s; } .vpanel.active .vl-row:nth-child(5) { animation-delay: 0.21s; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-20px); } }
.st { justify-self: start; font-size: 0.76rem; font-weight: 600; padding: 4px 10px; border-radius: 100px; }
.st.prog { background: #fff1e0; color: #c2410c; } .st.todo { background: var(--primary-50); color: var(--primary); } .st.done { background: #dcfce7; color: #15803d; }

/* calendar view */
.vc-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; }
.vc-days span { text-align: center; font-family: var(--font-head); font-weight: 600; font-size: 0.78rem; color: var(--muted); }
.vc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.vc-cell { min-height: 58px; padding: 6px 8px; border-radius: 10px; background: var(--bg-soft); font-size: 0.75rem; color: var(--muted); display: grid; align-content: start; gap: 4px; }
.vc-cell.today { background: var(--primary-50); box-shadow: inset 0 0 0 2px var(--primary-200); color: var(--primary); font-weight: 700; }
.vc-ev { font-size: 0.66rem; font-weight: 600; padding: 3px 6px; border-radius: 6px; background: var(--primary); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-ev.g { background: var(--success); } .vc-ev.o { background: #f59e0b; }
.vpanel.active .vc-ev { animation: cardDrop 0.5s var(--ease-back) both; animation-delay: var(--d, 0s); }

/* dashboard view */
.vd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.vd-kpi { position: relative; padding: 22px; border-radius: 18px; background: var(--bg-soft); display: grid; gap: 6px; overflow: hidden; }
.vd-kpi small { color: var(--muted); font-weight: 500; }
.vd-kpi strong { font-family: var(--font-head); font-size: 2.2rem; color: var(--ink); line-height: 1; }
.vd-ring {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--fill, 0) * 1%), var(--primary-100) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent 68%, #000 70%);
  mask: radial-gradient(farthest-side, transparent 68%, #000 70%);
}
.vd-bar { height: 8px; border-radius: 8px; background: var(--primary-100); overflow: hidden; margin-top: 8px; }
.vd-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: var(--grad); transition: width 1s var(--ease) 0.2s; }
.vd-bar.warn i { background: linear-gradient(90deg, #f59e0b, #ea580c); }
.vpanel.active .vd-bar i { width: var(--w); }
.vd-chart { grid-column: span 3; padding: 22px; border-radius: 18px; background: var(--bg-soft); }
.vd-chart small { color: var(--muted); font-weight: 500; }
.vd-bars { display: flex; align-items: flex-end; gap: 14px; height: 130px; margin-top: 16px; }
.vd-bars i { flex: 1; height: var(--h); border-radius: 8px 8px 3px 3px; background: var(--grad); transform-origin: bottom; }
.vpanel.active .vd-bars i { animation: barUp 0.9s var(--ease-back) both; }
.vpanel.active .vd-bars i:nth-child(2) { animation-delay: 0.06s; } .vpanel.active .vd-bars i:nth-child(3) { animation-delay: 0.12s; }
.vpanel.active .vd-bars i:nth-child(4) { animation-delay: 0.18s; } .vpanel.active .vd-bars i:nth-child(5) { animation-delay: 0.24s; }
.vpanel.active .vd-bars i:nth-child(6) { animation-delay: 0.3s; } .vpanel.active .vd-bars i:nth-child(7) { animation-delay: 0.36s; }
@keyframes barUp { from { transform: scaleY(0); } }

/* Approval flow */
.flow-sec { overflow: hidden; isolation: isolate; }
.flow-sec .bg-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(110, 155, 255, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(110, 155, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.approval { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.ap-track { position: absolute; top: 38px; left: 12.5%; right: 12.5%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.ap-fill { position: relative; display: block; height: 100%; width: 0; border-radius: 3px; background: var(--grad); box-shadow: 0 0 14px rgba(95, 180, 255, 0.8); transition: width 0.9s var(--ease); }
.ap-fill::after {
  content: "\f15c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; right: -14px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: #fff; color: var(--primary); font-size: 0.8rem;
  box-shadow: 0 0 20px rgba(95, 180, 255, 0.8);
}
.ap-node > span {
  position: relative; z-index: 1;
  width: 78px; height: 78px; margin: 0 auto 18px;
  border-radius: 24px;
  display: grid; place-items: center;
  background: var(--navy-2); border: 2px solid rgba(110, 155, 255, 0.3);
  color: #7f95cc; font-size: 1.5rem;
  transition: all 0.5s var(--ease-back);
}
.ap-node h3 { font-size: 1.1rem; margin-bottom: 4px; color: #8a99c4; transition: color 0.4s; }
.ap-node small { color: #7f8db8; font-size: 0.85rem; }
.ap-node.active > span { background: var(--grad); border-color: transparent; color: #fff; transform: scale(1.08); box-shadow: 0 0 0 8px rgba(47, 107, 255, 0.15), 0 0 40px rgba(47, 107, 255, 0.6); }
.ap-node.active h3 { color: #fff; }
.ap-node.current > span { animation: apPulse 1.4s ease-in-out infinite; }
.ap-node.final.active > span { background: linear-gradient(135deg, #12b76a, #0e9f5c); box-shadow: 0 0 0 8px rgba(18, 183, 106, 0.15), 0 0 40px rgba(18, 183, 106, 0.5); }
@keyframes apPulse { 50% { box-shadow: 0 0 0 16px rgba(47, 107, 255, 0), 0 0 40px rgba(47, 107, 255, 0.6); } }
.ap-notify {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: fit-content; margin: 46px auto 0;
  padding: 14px 22px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(110, 155, 255, 0.25);
  color: #dbe4ff; font-weight: 500;
}
.ap-notify i { color: #febc2e; animation: bell 1.6s ease-in-out infinite; transform-origin: top center; }
.ap-notify.flash { animation: notifyFlash 0.6s var(--ease); }
@keyframes bell { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
@keyframes notifyFlash { from { transform: scale(0.94); opacity: 0.4; } }

/* Features */
.fd-feats .card h3 { font-size: 1.12rem; }
.fd-feats .card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Departments */
.dept-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.dept {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform 0.45s var(--ease), box-shadow 0.45s, border-color 0.45s;
}
.dept:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--primary-200); }
.dept-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.dept-top i { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-50); color: var(--primary); font-size: 1.15rem; transition: background 0.3s, color 0.3s, transform 0.5s var(--ease-back); }
.dept:hover .dept-top i { background: var(--primary); color: #fff; transform: rotate(-8deg); }
.dept-top h3 { margin: 0; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chain span {
  position: relative;
  padding: 6px 12px; border-radius: 100px;
  background: var(--bg-soft); border: 1px solid var(--line);
  font-size: 0.8rem; font-weight: 600; color: var(--ink-2);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.chain span:not(:last-child)::after { content: "→"; margin-left: 10px; color: var(--primary-300); }
.chain span:not(:last-child) { padding-right: 4px; background: none; border: 0; }
.chain span { transition-delay: calc(var(--i, 0) * 0.12s); }
.dept:hover .chain span:last-child { background: var(--primary); color: #fff; border-color: var(--primary); }
.dept:hover .chain span:not(:last-child) { color: var(--primary); }

.page-cta { margin-top: 40px; }

/* Responsive */
@media (max-width: 1024px) {
  .fd-hero-inner { grid-template-columns: 1fr; }
  .board-wrap { margin: 20px auto 0; }
  .dept-grid { grid-template-columns: repeat(2, 1fr); }
  .vb-cols { grid-template-columns: repeat(2, 1fr); }
  .vb-col { min-height: 0; }
}
@media (max-width: 680px) {
  .bcol { min-height: 250px; padding: 8px; }
  .kcard { font-size: 0.66rem; padding: 8px; }
  .kcard .tag-s { font-size: 0.52rem; padding: 2px 5px; }
  .fd-chip { left: 0; font-size: 0.72rem; }
  .fd-toast { right: 0; font-size: 0.75rem; }
  .view-tabs { border-radius: 20px; }
  .vt { font-size: 0.75rem; padding: 10px 4px; gap: 5px; flex-direction: column; border-radius: 14px; }
  .vt-ink { border-radius: 14px; }
  .view-stage { padding: 16px; }
  .vb-cols { grid-template-columns: 1fr; }
  .vl-row { grid-template-columns: 1.6fr 1fr; font-size: 0.82rem; }
  .vl-row span:nth-child(3) { display: none; }
  .vl-row span:nth-child(2) { display: none; }
  .vl-row.head span:nth-child(4), .vl-row span:nth-child(4) { justify-self: end; }
  .vc-cell { min-height: 46px; padding: 4px; font-size: 0.65rem; }
  .vc-ev { font-size: 0; padding: 0; height: 6px; }
  .vd { grid-template-columns: 1fr; }
  .vd-chart { grid-column: auto; }
  .approval { grid-template-columns: 1fr; gap: 34px; }
  .ap-track { top: 39px; bottom: 60px; left: 50%; right: auto; width: 3px; height: auto; margin-left: -1.5px; }
  .ap-fill { width: 100% !important; height: var(--fill, 0%); transition: height 0.9s var(--ease); }
  .ap-fill::after { right: 50%; top: auto; bottom: -14px; transform: translateX(50%); }
  .ap-notify { border-radius: 18px; text-align: left; }
  .dept-grid { grid-template-columns: 1fr; }
}
