/* Premium components: panels, actions, tabs, stats, timeline, step rails. */

.wm-panel{
  position:relative;
  overflow:hidden;
  border:1px solid var(--wmp-border);
  border-radius:var(--wmp-radius-lg);
  background:
    linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.018)),
    var(--wmp-surface);
  box-shadow:var(--wmp-shadow-tight),inset 0 1px 0 rgba(255,255,255,.06);
}

.wm-panel::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-top:1px solid rgba(255,255,255,.06);
  background:linear-gradient(115deg,transparent 0 42%,rgba(255,255,255,.035) 42.2%,transparent 43.2% 100%);
  opacity:.7;
}

.wm-panel--pad{
  padding:clamp(16px,2vw,24px);
}

.wm-panel__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.wm-panel__head h2,
.wm-panel__head h3{
  margin:0;
}

.wm-btn{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 15px;
  border:1px solid var(--wmp-border);
  border-radius:var(--wmp-radius-sm);
  color:var(--wmp-text);
  background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.025));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  text-decoration:none;
  font:inherit;
  font-weight:850;
  cursor:pointer;
}

.wm-btn--primary{
  border-color:rgba(var(--wmp-accent-rgb),.52);
  color:#fff;
  background:linear-gradient(180deg,color-mix(in srgb,var(--wmp-accent) 86%,#fff 14%),var(--wmp-accent));
  box-shadow:0 12px 28px rgba(var(--wmp-accent-rgb),.22),inset 0 1px 0 rgba(255,255,255,.18);
}

.wm-btn--ghost{
  color:var(--wmp-text-soft);
  background:rgba(255,255,255,.025);
}

.wm-btn--danger{
  border-color:rgba(239,102,102,.38);
  color:#ffd1d1;
  background:rgba(239,102,102,.10);
}

html[data-theme="light"] .wm-btn--danger{
  color:#8f2424;
}

.wm-btn--sm{
  min-height:32px;
  padding:0 11px;
  font-size:.84rem;
}

.wm-chip{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 10px;
  border:1px solid var(--wmp-border);
  border-radius:999px;
  color:var(--wmp-text-soft);
  background:rgba(255,255,255,.035);
  font-size:.8rem;
  font-weight:850;
}

.wm-chip::before{
  content:"";
  width:7px;
  height:7px;
  border-radius:99px;
  background:var(--wmp-accent);
  box-shadow:0 0 0 4px rgba(var(--wmp-accent-rgb),.12);
}

.wm-chip--success::before{background:var(--wmp-success)}
.wm-chip--warning::before{background:var(--wmp-warning)}
.wm-chip--danger::before{background:var(--wmp-danger)}

.wm-stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
  gap:10px;
}

.wm-stat-tile{
  min-height:76px;
  display:grid;
  align-content:center;
  gap:6px;
  padding:14px;
  border:1px solid var(--wmp-border);
  border-radius:var(--wmp-radius-md);
  background:linear-gradient(180deg,rgba(255,255,255,.052),rgba(255,255,255,.02));
}

.wm-stat-tile span{
  color:var(--wmp-muted);
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.wm-stat-tile strong{
  color:var(--wmp-text);
  font-size:clamp(1.15rem,2vw,1.7rem);
  line-height:1;
}

.wm-folder-tabs{
  display:flex;
  gap:0;
  overflow-x:auto;
  padding:0 12px;
  border-bottom:1px solid var(--wmp-border);
  background:
    linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.015)),
    var(--wmp-bg-2);
  scrollbar-width:thin;
}

.wm-folder-tab{
  min-width:max-content;
  min-height:56px;
  display:grid;
  align-content:center;
  gap:4px;
  margin:0 -11px 0 0;
  padding:10px 26px 10px 22px;
  border:1px solid var(--wmp-border);
  border-bottom:0;
  border-radius:var(--wmp-radius-xs) var(--wmp-radius-xs) 0 0;
  color:var(--wmp-muted);
  background:linear-gradient(180deg,var(--wmp-bg-3),var(--wmp-bg-2));
  clip-path:polygon(0 0,calc(100% - var(--wmp-cut-md)) 0,100% 100%,0 100%);
  text-align:left;
  font:inherit;
  cursor:pointer;
}

.wm-folder-tab strong{
  color:inherit;
  font-size:.94rem;
  line-height:1;
}

.wm-folder-tab small{
  color:color-mix(in srgb,currentColor 62%,transparent);
  font-size:.72rem;
  font-weight:750;
}

.wm-folder-tab.is-active{
  z-index:2;
  color:var(--wmp-text);
  border-color:rgba(var(--wmp-accent-rgb),.48);
  background:
    linear-gradient(180deg,rgba(var(--wmp-accent-rgb),.18),rgba(var(--wmp-accent-rgb),.045)),
    var(--wmp-surface-solid);
  box-shadow:inset 0 -2px 0 var(--wmp-accent),inset 0 1px 0 rgba(255,255,255,.08);
}

.wm-tab-panel{
  display:none;
  padding:clamp(16px,2.4vw,28px);
}

.wm-tab-panel.is-active{
  display:block;
}

.wm-timeline{
  position:relative;
  display:grid;
  gap:12px;
  padding-left:24px;
}

.wm-timeline::before{
  content:"";
  position:absolute;
  top:10px;
  bottom:10px;
  left:8px;
  width:1px;
  background:linear-gradient(180deg,var(--wmp-accent),var(--wmp-border),transparent);
}

.wm-timeline-item{
  position:relative;
  display:grid;
  grid-template-columns:120px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  padding:14px;
  border:1px solid var(--wmp-border);
  border-radius:var(--wmp-radius-md);
  background:linear-gradient(180deg,rgba(255,255,255,.045),rgba(255,255,255,.018)),var(--wmp-surface-2);
}

.wm-timeline-item::before{
  content:"";
  position:absolute;
  left:-21px;
  top:20px;
  width:9px;
  height:9px;
  border-radius:99px;
  background:var(--wmp-accent);
  box-shadow:0 0 0 4px rgba(var(--wmp-accent-rgb),.13);
}

.wm-timeline-date,
.wm-meta{
  color:var(--wmp-muted);
  font-size:.82rem;
  font-weight:800;
}

.wm-empty-state{
  display:grid;
  gap:10px;
  padding:20px;
  border:1px dashed var(--wmp-border-strong);
  border-radius:var(--wmp-radius-md);
  color:var(--wmp-muted);
  background:rgba(255,255,255,.025);
}

.wm-step-rail{
  display:grid;
  grid-template-columns:repeat(var(--wmp-steps,4),minmax(0,1fr));
  border:1px solid var(--wmp-border);
  border-radius:var(--wmp-radius-md);
  overflow:hidden;
  background:var(--wmp-surface);
}

.wm-step{
  min-height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--wmp-muted);
  font-weight:850;
}

.wm-step.is-active{
  color:var(--wmp-text);
  background:var(--wmp-accent-soft);
  box-shadow:inset 0 -2px 0 var(--wmp-accent);
}

@media(max-width:760px){
  .wm-folder-tab{
    min-height:50px;
    padding:9px 18px;
  }

  .wm-folder-tab small{
    display:none;
  }

  .wm-tab-panel{
    padding:16px;
  }

  .wm-timeline-item{
    grid-template-columns:1fr;
  }

  .wm-step-rail{
    grid-template-columns:1fr;
  }
}
