/* ============ Kanban ============ */
.kanban-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #f7f8fa; }
.kanban-scroll { flex: 1; overflow-x: auto; overflow-y: hidden; display: flex; align-items: stretch; gap: 12px; padding: 12px; }
.kanban-stack {
  width: 276px; flex: none; display: flex; flex-direction: column;
  background: #f2f2f2; border-radius: var(--radius-lg);
  border: 1px solid var(--border-quiet);
  max-height: 100%;
}
.kanban-stack.drag-over { background: #e9eef5; }
.ks-header { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px 12px; flex: none; }
.ks-header .ks-count { color: var(--text-faint); font-size: 12px; }
.ks-header .ks-more { margin-left: auto; color: var(--text-quiet); border-radius: 4px; padding: 2px; opacity: 0; }
.kanban-stack:hover .ks-more { opacity: 1; }
.ks-header .ks-more:hover { background: var(--bg-hover); }
.ks-cards { flex: 1; overflow-y: auto; padding: 2px 8px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.kanban-card {
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 10px 12px; cursor: pointer; user-select: none;
  transition: box-shadow 0.1s ease;
  position: relative; overflow: hidden;
}
.kc-colorstrip { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.kanban-card:hover { box-shadow: 0 0 0 1px rgba(0,0,0,0.12), 0 3px 8px rgba(0,0,0,0.12); }
.kanban-card.dragging { opacity: 0.4; }
.kc-title { font-weight: 500; font-size: 13px; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; }
.kc-field { margin-top: 6px; min-height: 16px; }
.kc-field .kc-label { font-size: 10px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 2px; }
.kc-value { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.ks-addcard {
  margin: 0 8px 10px 8px; height: 32px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-quiet); background: transparent; flex: none;
}
.ks-addcard:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.kanban-card-placeholder { border-radius: var(--radius); background: rgba(45,127,249,0.12); border: 1px dashed var(--blue-focus); }
.kanban-newstack { width: 276px; flex: none; }
.kanban-newstack button {
  width: 100%; height: 40px; border-radius: var(--radius-lg);
  border: 1px dashed var(--border-dark); color: var(--text-quiet);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.kanban-newstack button:hover { background: rgba(0,0,0,0.04); }

/* ============ Gallery ============ */
.gallery-view { flex: 1; min-height: 0; overflow-y: auto; background: #f7f8fa; padding: 16px; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.gallery-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card); cursor: pointer; overflow: hidden;
  transition: box-shadow 0.12s ease, transform 0.12s ease;
}
.gallery-card:hover { box-shadow: 0 0 0 1px rgba(0,0,0,0.12), 0 5px 14px rgba(0,0,0,0.13); }
.gc-cover {
  height: 96px; display: flex; align-items: center; justify-content: center;
  background: #f2f3f5; border-bottom: 1px solid var(--border-quiet);
  color: #c6cad1; position: relative;
}
.gc-cover-strip { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.gc-cover-glyph { display: inline-flex; }
.gc-body { padding: 12px 14px 14px 14px; }
.gc-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-field { margin-top: 8px; }
.gc-label { font-size: 10px; letter-spacing: 0.3px; text-transform: uppercase; color: var(--text-faint); margin-bottom: 3px; }
.gc-value { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 4px; min-height: 16px; }
.gallery-addcard {
  border: 1px dashed var(--border-dark); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  color: var(--text-quiet); min-height: 120px; cursor: pointer; background: transparent;
}
.gallery-addcard:hover { background: rgba(0,0,0,0.03); color: var(--text); }

/* ============ Calendar ============ */
.calendar-view { flex: 1; min-height: 0; display: flex; flex-direction: column; background: #fff; }
.cal-header { display: flex; align-items: center; gap: 8px; padding: 10px 16px; flex: none; }
.cal-title { font-size: 17px; font-weight: 675; margin-right: 8px; min-width: 150px; }
.cal-nav { display: flex; align-items: center; gap: 2px; }
.cal-nav .btn { width: 28px; padding: 0; justify-content: center; }
.cal-grid { flex: 1; min-height: 0; display: grid; grid-template-rows: 24px 1fr; }
.cal-dows { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.cal-dow { font-size: 11px; font-weight: 500; color: var(--text-quiet); text-align: center; line-height: 24px; text-transform: uppercase; letter-spacing: 0.5px; }
.cal-weeks { display: grid; grid-auto-rows: 1fr; min-height: 0; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); min-height: 0; }
.cal-day { border-right: 1px solid var(--border-quiet); border-bottom: 1px solid var(--border-quiet); padding: 4px; overflow: hidden; display: flex; flex-direction: column; position: relative; }
.cal-day:nth-child(7n) { border-right: none; }
.cal-day.other-month { background: #fafafa; }
.cal-day.other-month .cal-daynum { color: var(--text-faint); }
.cal-daynum { font-size: 11px; color: var(--text-mid); padding: 2px 4px; align-self: flex-end; border-radius: 9999px; min-width: 20px; text-align: center; }
.cal-day.today .cal-daynum { background: var(--red); color: #fff; font-weight: 600; }
.cal-day .cal-addbtn {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 4px;
  display: none; align-items: center; justify-content: center; color: var(--text-quiet); background: #fff;
  box-shadow: var(--shadow-card);
}
.cal-day:hover .cal-addbtn { display: inline-flex; }
.cal-day .cal-addbtn:hover { color: var(--text); background: var(--bg-gray); }
.cal-chips { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.cal-chip {
  height: 22px; flex: none; border-radius: 4px; padding: 0 6px;
  background: var(--c-blueLight); font-size: 12px; line-height: 22px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06);
}
.cal-chip:hover { filter: brightness(0.96); }
.cal-chip.dragging { opacity: 0.4; }
.cal-more { font-size: 11px; color: var(--text-quiet); padding-left: 4px; cursor: pointer; }
.cal-more:hover { text-decoration: underline; }
.cal-day.drag-over { background: var(--blue-selected-solid); }
.cal-nodate-note { font-size: 12px; color: var(--text-quiet); margin-left: auto; }

/* ============ Form ============ */
.form-view { flex: 1; min-height: 0; overflow-y: auto; background: #f0f2f5; }
.form-canvas { max-width: 640px; margin: 24px auto 60px auto; }
.form-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; }
.form-banner { height: 8px; }
.form-body { padding: 32px 40px 40px 40px; }
.form-title { font-size: 24px; font-weight: 675; margin-bottom: 8px; }
.form-desc { color: var(--text-quiet); margin-bottom: 24px; font-size: 13px; }
.form-field { margin-bottom: 22px; }
.form-field-label { font-size: 14px; font-weight: 500; margin-bottom: 6px; display: flex; gap: 4px; align-items: center; }
.form-field-label .req { color: var(--red); }
.form-field-help { font-size: 12px; color: var(--text-faint); margin-bottom: 6px; }
.form-input, .form-textarea {
  width: 100%; padding: 7px 10px; border-radius: var(--radius);
  border: 2px solid transparent; box-shadow: inset 0 0 0 1px var(--border-dark);
  outline: none; font-size: 14px; background: #fff;
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-input:focus, .form-textarea:focus { box-shadow: none; border-color: var(--blue-focus); }
.form-select-list { display: flex; flex-direction: column; gap: 6px; }
.form-choice {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer; font-size: 14px;
}
.form-choice:hover { background: var(--bg-hover-quiet); }
.form-choice.selected { box-shadow: inset 0 0 0 2px var(--blue-focus); background: var(--blue-selected-solid); }
.form-submitrow { margin-top: 28px; }
.form-submitrow .btn { height: 36px; padding: 0 18px; font-size: 14px; border-radius: var(--radius); }
.form-success { text-align: center; padding: 60px 40px; }
.form-success .fs-check { color: #20c933; margin-bottom: 16px; }
.form-success .fs-title { font-size: 20px; font-weight: 675; margin-bottom: 8px; }
.form-success .fs-sub { color: var(--text-quiet); margin-bottom: 24px; }
.form-powered { text-align: center; padding: 18px; color: var(--text-faint); font-size: 12px; }
.form-star-row { display: flex; gap: 4px; }
.form-star-row .star { cursor: pointer; color: rgba(0,0,0,0.15); }
.form-star-row .star.on { color: #fcb400; }
