/* input: _shared/tokens.css/components.css
 * output: screenshot-matched wide panel prototype styles
 * pos: prototype-only stylesheet
 */

html, body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ql-font-family);
  color: var(--ql-text);
  background: var(--ql-bg);
}

button, input, textarea { font: inherit; }
button { border: 0; }

.proto-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
}

.ctrl {
  background: var(--ql-surface);
  border-right: 1px solid var(--ql-border);
  padding: 20px;
  overflow-y: auto;
}

.ctrl__header { margin-bottom: 18px; }
.ctrl__title { font-size: 18px; font-weight: 760; }
.ctrl__sub { margin-top: 6px; font-size: 12px; color: var(--ql-text-muted); line-height: 1.5; }
.ctrl__group-title { margin: 18px 0 10px; font-size: 12px; font-weight: 760; color: var(--ql-text-secondary); }
.ctrl__guide {
  padding: 14px;
  border: 1px solid var(--ql-border-light);
  border-radius: var(--ql-radius-panel);
  background: var(--ql-surface-alt);
}
.guide-rule { margin: 0; padding-left: 18px; color: var(--ql-text-secondary); font-size: 12px; line-height: 1.7; }
.ctrl__options { display: grid; gap: 10px; }
.ctrl__radio {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--ql-border-light);
  border-radius: var(--ql-radius-control);
  background: var(--ql-surface);
  cursor: pointer;
}
.ctrl__radio input { display: none; }
.ctrl__radio[data-active="true"] {
  border-color: var(--ql-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ql-action) 12%, transparent);
}
.ctrl__dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--ql-border);
}
.ctrl__radio[data-active="true"] .ctrl__dot {
  background: var(--ql-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ql-action) 14%, transparent);
}
.ctrl__radio-title { display: block; font-size: 13px; font-weight: 720; }
.ctrl__radio-desc { display: block; margin-top: 3px; font-size: 11px; line-height: 1.45; color: var(--ql-text-muted); }

.app-stage {
  padding: 12px;
  background:
    radial-gradient(circle at 20% 10%, rgba(232, 76, 136, .06), transparent 24%),
    var(--ql-app-bg);
  overflow: hidden;
}

.wide-panel {
  height: calc(100vh - 24px);
  min-height: 680px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #eadfe3;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 48px rgba(60, 40, 52, .14);
}

.panel-top {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  border-bottom: 1px solid #eadfe3;
  flex-shrink: 0;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #fff0f5;
  color: #e84c88;
  font-weight: 800;
}
.panel-top strong { font-size: 17px; }
.close-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  background: transparent;
  color: #9b7584;
  font-size: 25px;
}

.panel-main {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(620px, 1.08fr) minmax(430px, .92fr);
  border-bottom: 1px solid #eadfe3;
}

.condition-side,
.config-side {
  min-width: 0;
  overflow: auto;
  padding: 18px;
}
.condition-side { border-right: 1px solid #eadfe3; }
.config-side { background: rgba(255,255,255,.68); }

.condition-card,
.step-card {
  border: 1px solid #eadfe3;
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  overflow: hidden;
}

.card-head {
  height: 46px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eadfe3;
  background: linear-gradient(180deg, #fff7fb, #fff);
}
.head-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.head-title strong { font-size: 14px; }
.head-title span:last-child { color: #bba8b0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #6b3a5d; flex-shrink: 0; }
.badge {
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: #6b3a5d;
  color: white;
  font-size: 11px;
  font-weight: 760;
}

.filter-list { padding: 0 16px 14px; }
.filter-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: 138px 1fr;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #eee5e8;
}
.filter-row:last-child { border-bottom: 0; }
.row-title {
  display: grid;
  grid-template-columns: 18px 1fr;
  column-gap: 8px;
  align-items: center;
  color: #6f4b5b;
}
.row-title strong { font-size: 13px; }
.row-title small {
  grid-column: 2;
  margin-top: 3px;
  color: #b8a2ab;
  font-size: 11px;
}
.icon { color: #9b637b; text-align: center; font-size: 13px; }
.row-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.chip,
.select-chip {
  height: 30px;
  padding: 0 14px;
  border: 1px solid #eadfe3;
  border-radius: 999px;
  background: #fff;
  color: #9a7180;
  font-size: 12px;
  font-weight: 650;
}
.chip.active {
  border-color: #ff75aa;
  color: #e84c88;
  background: #fff5f9;
}
.toggle-label { font-size: 13px; font-weight: 700; color: #6f4b5b; }
.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d6cbd1;
  position: relative;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,.16);
}
.search-row { min-height: 96px; }
.search-grid {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px 10px;
  align-items: center;
}
.search-grid > span { color: #9a7180; font-size: 12px; font-weight: 700; }

.merged-card {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.task-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-label {
  color: #8c6575;
  font-size: 12px;
  font-weight: 760;
}
.input-shell {
  height: 42px;
  border: 1px solid #eadfe3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: white;
}
.input-shell span { color: #b59eaa; }
.input-shell input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #4d3540;
  background: transparent;
  font-size: 13px;
}
.input-shell input::placeholder,
textarea::placeholder { color: #c6b6bd; }
.field-hint {
  margin-top: -4px;
  color: #b59eaa;
  font-size: 11px;
  line-height: 1.45;
}

.dedup-control {
  border: 1px solid #eadfe3;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8fb, #fff);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dedup-control__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.dedup-control__head strong {
  font-size: 13px;
  color: #442c37;
}
.dedup-control__head span {
  color: #b59eaa;
  font-size: 11px;
  white-space: nowrap;
}
.dedup-status {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #f0e5e9;
  border-radius: 12px;
  background: rgba(255,255,255,.75);
  color: #6f4b5b;
  font-size: 12px;
  font-weight: 650;
}
.dedup-status[data-visible="false"] {
  display: none;
}
.quick-folds {
  display: grid;
  gap: 8px;
}
.quick-fold {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #f0e5e9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.72);
  color: #442c37;
  text-align: left;
  cursor: pointer;
}
.quick-fold strong {
  font-size: 12px;
  font-weight: 760;
}
.quick-fold small {
  margin-left: 8px;
  color: #b59eaa;
  font-size: 11px;
}
.quick-fold b {
  color: #9b7584;
  font-size: 15px;
  transition: transform .16s ease;
}
.quick-fold[data-open="true"] {
  border-color: rgba(232,76,136,.28);
  background: #fff;
}
.quick-fold[data-open="true"] b {
  transform: rotate(180deg);
}
.quick-panel {
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 0 2px 2px;
}
.quick-panel[data-open="true"] {
  display: flex;
}
.summary-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #d8cbd1;
  flex-shrink: 0;
}
.summary-dot.on {
  background: #e84c88;
  box-shadow: 0 0 0 4px rgba(232,76,136,.10);
}
.advanced-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #f0e5e9;
  border-radius: 14px;
  background: #fff;
}

textarea {
  width: 100%;
  min-height: 82px;
  padding: 12px;
  border: 1px solid #eadfe3;
  border-radius: 12px;
  outline: 0;
  resize: vertical;
  color: #4d3540;
  background: white;
  font-size: 13px;
  line-height: 1.55;
  box-sizing: border-box;
}
.dedup-body textarea { min-height: 88px; }

.selected-projects {
  min-height: 44px;
  padding: 12px;
  border: 1px solid #eadfe3;
  border-radius: 12px;
  background: #faf7f8;
  color: #b59eaa;
  font-size: 12px;
}
.project-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(232,76,136,.22);
  border-radius: 999px;
  background: white;
  color: #e84c88;
  font-size: 12px;
  font-weight: 650;
}
.segmented {
  height: 44px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border: 1px solid #eadfe3;
  border-radius: 999px;
  background: #f2edf0;
}
.segmented input { display: none; }
.segmented span {
  height: 100%;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #8c6575;
  font-size: 12px;
  font-weight: 700;
}
.segmented input:checked + span {
  color: #7f244d;
  background: linear-gradient(90deg, #f8d9e8, #f5c9de);
}

.panel-footer {
  height: 56px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 0 24px;
  flex-shrink: 0;
  background: rgba(255,255,255,.88);
}
.reset-btn {
  height: 36px;
  padding: 0 22px;
  border: 1px solid #eadfe3;
  border-radius: 999px;
  background: white;
  color: #9b7584;
  font-weight: 700;
}
.start-btn {
  height: 38px;
  padding: 0 26px;
  border-radius: 999px;
  background: #e84c88;
  color: white;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(232,76,136,.28);
}

@media (max-width: 1260px) {
  .proto-shell { grid-template-columns: 280px minmax(0, 1fr); }
  .panel-main { grid-template-columns: 1fr; overflow: auto; }
  .condition-side { border-right: 0; border-bottom: 1px solid #eadfe3; }
  .wide-panel { min-height: 820px; }
}
