/* ===========================================================================
   workflow.css — interactive "CurveFlow" workflow dashboard (Solution 02)
   A faithful HTML/CSS recreation of the dark Workflow Dashboard (no image).
   All tokens scoped to .wf so the product's dark/indigo palette never leaks
   into the surrounding Apple-monochrome page.
   =========================================================================== */

.wf-stage {
  margin: clamp(40px, 6vw, 72px) auto 0;
  max-width: 1160px;
}

.wf {
  --w-bg: #0a0a10;
  --w-panel: #101019;
  --w-soft: #15151f;
  --w-line: #23232f;
  --w-text: #f3f3f7;
  --w-text2: #a2a2b2;
  --w-text3: #6a6a7c;
  --w-accent: #5b9bd8;            /* Trio blue, brightened for the dark UI */
  --w-accent2: #3f7fc0;
  --w-accent-soft: rgba(91,155,216,.16);
  --w-green: #3ecf8e;
  --w-amber: #e0a83a;
  --w-blue: #4f9bff;

  position: relative;
  border: 1px solid var(--w-line);
  border-radius: 16px;
  background: var(--w-bg);
  color: var(--w-text);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 36px 80px -34px rgba(0,0,0,.7);
  font-size: 14px;
}

/* ------------------------------ title bar ------------------------------- */
.wf-bar {
  display: flex; align-items: center; gap: 14px;
  height: 46px; padding: 0 14px;
  background: var(--w-panel);
  border-bottom: 1px solid var(--w-line);
}
.wf-dots { display: inline-flex; gap: 7px; }
.wf-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2b2b36; }
.wf-bar-title { font-size: 12.5px; font-weight: 500; color: var(--w-text2); letter-spacing: -.01em; }
.wf-bar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--w-text2); }
.wf-bell { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; }
.wf-bell svg { width: 18px; height: 18px; }
.wf-bell::after { content: ""; position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--w-accent); }

/* -------------------------------- body ---------------------------------- */
.wf-body { display: grid; grid-template-columns: 224px 1fr; }

/* sidebar */
.wf-side {
  border-right: 1px solid var(--w-line);
  background: var(--w-panel);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 6px;
  min-height: 640px;
}
.wf-brand { padding: 2px 8px 14px; }
.wf-brand b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.wf-brand b span { color: var(--w-accent); }
.wf-brand small { display: block; font-size: 11.5px; color: var(--w-text3); margin-top: 2px; }

.wf-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.wf-navi {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--w-text2);
  cursor: pointer; transition: background .18s, color .18s;
}
.wf-navi svg { width: 19px; height: 19px; flex: none; }
.wf-navi:hover { background: var(--w-soft); color: var(--w-text); }
.wf-navi.is-active { background: var(--w-accent); color: #fff; font-weight: 600; box-shadow: 0 8px 22px -8px var(--w-accent); }
.wf-navi .wf-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 600; border-radius: 10px;
  background: var(--w-green); color: #05281a;
}
.wf-navi.is-active .wf-badge { background: rgba(255,255,255,.25); color: #fff; }

.wf-user { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 10px 6px 4px; }
.wf-signout { display: flex; align-items: center; gap: 11px; padding: 10px 8px; color: var(--w-text2); font-size: 13.5px; cursor: pointer; border-radius: 10px; }
.wf-signout:hover { background: var(--w-soft); color: var(--w-text); }
.wf-signout .wf-ava { background: #1a1a24; }

.wf-ava {
  flex: none; display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(150deg, #3f8ad0, #155291);
  color: #fff; font-size: 13px; font-weight: 600;
}
.wf-ava.sm { width: 26px; height: 26px; font-size: 11px; }
.wf-utxt { display: flex; flex-direction: column; line-height: 1.25; }
.wf-utxt b { font-size: 13.5px; font-weight: 600; }
.wf-utxt small { font-size: 11.5px; color: var(--w-text3); }

/* main */
.wf-main { padding: clamp(16px, 2vw, 26px); background: var(--w-bg); min-width: 0; }

.wf-search {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px; max-width: 420px;
  background: var(--w-soft); border: 1px solid var(--w-line); border-radius: 10px;
  color: var(--w-text3); font-size: 13.5px;
}
.wf-search svg { width: 16px; height: 16px; }

.wf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 20px; }
.wf-head h4 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: -.025em; display: flex; align-items: center; gap: 10px; }
.wf-ver { font-size: 11px; font-weight: 600; color: var(--w-text2); background: var(--w-soft); border: 1px solid var(--w-line); padding: 3px 8px; border-radius: 7px; letter-spacing: .02em; }
.wf-head p { margin-top: 6px; font-size: 14px; color: var(--w-text2); }

.wf-upload {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; font: inherit; font-size: 14px; font-weight: 600;
  color: #fff; border: none; border-radius: 11px; cursor: pointer;
  background: linear-gradient(135deg, #3f8ad0, #155291);
  box-shadow: 0 12px 26px -10px var(--w-accent);
  transition: transform .2s, box-shadow .2s; white-space: nowrap;
}
.wf-upload:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px var(--w-accent); }
.wf-upload svg { width: 17px; height: 17px; }

/* stat cards */
.wf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.wf-stat {
  display: flex; align-items: center; gap: 14px;
  padding: 18px; border-radius: 14px;
  background: linear-gradient(180deg, var(--w-soft), var(--w-panel));
  border: 1px solid var(--w-line);
}
.wf-stat-ic { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; }
.wf-stat-ic svg { width: 22px; height: 22px; }
.wf-stat-ic--indigo { background: var(--w-accent-soft); color: var(--w-accent); }
.wf-stat-ic--amber { background: rgba(224,168,58,.14); color: var(--w-amber); }
.wf-stat-ic--green { background: rgba(62,207,142,.14); color: var(--w-green); }
.wf-stat-ic--blue { background: rgba(79,155,255,.14); color: var(--w-blue); }
.wf-stat-num { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.wf-stat-lbl { font-size: 12.5px; color: var(--w-text2); margin-top: 4px; }

/* feed */
.wf-feed-h { margin: 28px 0 16px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.wf-feed { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }

.wf-card {
  border: 1px solid var(--w-line); border-radius: 14px;
  background: var(--w-panel); overflow: hidden;
  display: flex; flex-direction: column;
}
.wf-cover {
  position: relative; padding: 22px; min-height: 188px;
  display: flex; flex-direction: column; gap: 18px;
}
.wf-cover-title { font-size: 19px; font-weight: 700; letter-spacing: -.02em; color: #fff; position: relative; z-index: 1; }
.wf-cover-panes { display: flex; gap: 14px; flex: 1; }
.wf-cover-panes i { flex: 1; border-radius: 10px; background: rgba(255,255,255,.16); }
.wf-cover--purple { background: linear-gradient(150deg, #2e6fb0, #0A3C6F); }
.wf-cover--blue { background: linear-gradient(150deg, #4a8fd6, #155291); }
.wf-cover--teal { background: linear-gradient(150deg, #cdb083, #a3814a); }
.wf-cover--orange { background: linear-gradient(150deg, #b98f55, #7a5a2c); }

.wf-card-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.wf-tag-text { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--w-text3); text-transform: uppercase; }
.wf-tag-text svg { width: 14px; height: 14px; }
.wf-post-lead { font-size: 16px; line-height: 1.5; color: var(--w-text); }
.wf-doc { display: flex; gap: 9px; font-size: 14px; line-height: 1.45; color: var(--w-text2); }
.wf-doc svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--w-text3); }

.wf-author { display: flex; align-items: center; gap: 10px; }
.wf-author b { font-size: 13.5px; font-weight: 600; display: block; }
.wf-author small { font-size: 12px; color: var(--w-text3); }
.wf-author .wf-online { width: 8px; height: 8px; border-radius: 50%; background: var(--w-green); margin-left: -14px; align-self: flex-end; border: 2px solid var(--w-panel); }

.wf-replies {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13px; color: var(--w-text2);
  background: none; border: none; padding: 4px 0; cursor: pointer; width: max-content;
  transition: color .2s;
}
.wf-replies:hover { color: var(--w-text); }
.wf-replies svg { width: 15px; height: 15px; }
.wf-chev { transition: transform .25s var(--ease); }
.wf-replies[aria-expanded="true"] .wf-chev { transform: rotate(180deg); }

.wf-thread { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 2px; }
.wf-thread[hidden] { display: none; }
.wf-reply { display: flex; gap: 10px; }
.wf-reply > div { min-width: 0; }
.wf-reply b { font-size: 12.5px; font-weight: 600; }
.wf-reply p { font-size: 13px; color: var(--w-text2); line-height: 1.4; margin-top: 1px; }
.wf-replyin { animation: wfRowIn .4s var(--ease) both; }

.wf-replybar {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--w-line); padding-top: 12px; margin-top: 2px;
}
.wf-replyinput {
  flex: 1; min-width: 0; height: 38px; padding: 0 14px;
  background: var(--w-soft); border: 1px solid var(--w-line); border-radius: 10px;
  color: var(--w-text); font: inherit; font-size: 13.5px;
}
.wf-replyinput::placeholder { color: var(--w-text3); }
.wf-replyinput:focus { outline: none; border-color: var(--w-accent); }
.wf-send {
  flex: none; display: inline-grid; place-items: center;
  width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
  background: var(--w-accent-soft); color: var(--w-accent);
  transition: background .2s, color .2s;
}
.wf-send:hover { background: var(--w-accent); color: #fff; }
.wf-send svg { width: 17px; height: 17px; }

.wf-cardin { animation: wfCardIn .5s var(--ease) both; }

@keyframes wfCardIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes wfRowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wf-cap { margin-top: 16px; text-align: center; font-size: 13px; color: var(--text-2); }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 1000px) { .wf-feed { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) {
  .wf-body { grid-template-columns: 1fr; }
  .wf-side { display: none; }
  .wf-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .wf-feed { grid-template-columns: 1fr; }
  .wf-head { flex-direction: column; }
}
@media (max-width: 480px) {
  .wf { font-size: 13px; }
  .wf-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wf-stat { padding: 14px; flex-direction: column; align-items: flex-start; gap: 10px; }
}
