/* Ex skill user console */
.ex-panel {
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f6f8fb;
}
.ex-panel .panel-back-btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff;
}
.ex-console-head {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 440px);
  gap: 24px;
  align-items: start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.ex-head-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.ex-title-block {
  min-width: 0;
}
.ex-title-block h3 {
  font-size: 26px;
  line-height: 1.15;
}
.ex-title-block .sub {
  max-width: 640px;
}
.ex-title-block h3,
.ex-pane-head h3 {
  margin: 0;
}
.ex-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 800;
}
.ex-console-head .sub,
.ex-pane-head .sub {
  margin: 7px 0 0;
}
.ex-stepper {
  margin: 0;
  padding: 5px;
  gap: 5px;
  border: 1px solid #dbe5ef;
  border-radius: 10px;
  background: #f8fafc;
  overflow: visible;
}
.ex-stepper span {
  min-height: 36px;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7d8794;
  font-size: 13px;
  font-weight: 800;
}
.ex-stepper span b {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e8eef6;
  color: #64748b;
  font-size: 12px;
}
.ex-stepper span.active {
  color: #1f2937;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .09);
}
.ex-stepper span.active b {
  background: #2563eb;
  color: #fff;
}
.ex-stepper span.done {
  color: #2563eb;
  background: rgba(255,255,255,.58);
}
.ex-stepper span.done b {
  background: #dbeafe;
  color: #2563eb;
}
.ex-workbench {
  display: grid;
  grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
  min-height: 620px;
}
.ex-pane {
  min-width: 0;
  padding: 24px;
}
.ex-setup-pane {
  border-right: 1px solid var(--line);
  background: #fff;
}
.ex-review-pane {
  background: #f8fafc;
}
.ex-pane-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.ex-section {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}
.ex-setup-card,
.ex-upload-card {
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}
.ex-section .field {
  margin: 0;
}
.ex-section-title {
  margin: 0 0 10px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
.ex-uploader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border: 1px dashed #bfd3e8;
  border-radius: 10px;
  background: #f8fbff;
}
.ex-upload-copy strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}
.ex-uploader .sub {
  width: auto;
  margin: 0;
  line-height: 1.6;
}
.ex-quota-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #c8ead8;
  border-radius: 8px;
  background: #f5fff9;
}
.ex-quota-card strong {
  display: block;
  margin-bottom: 4px;
  color: #166534;
  font-size: 14px;
}
.ex-quota-card p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}
.ex-quota-card.locked,
.ex-quota-card.empty {
  border-color: #fed7aa;
  background: #fff8ed;
}
.ex-quota-card.locked strong,
.ex-quota-card.empty strong {
  color: #9a3412;
}
.ex-quota-card.muted {
  border-color: #dbe3ef;
  background: #f8fafc;
}
.ex-quota-card.muted strong {
  color: #475569;
}
.ex-quota-card .btn {
  min-width: 96px;
  white-space: nowrap;
}
.ex-file-grid {
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0 0;
}
.ex-file-workbench {
  min-height: 480px;
  display: grid;
  grid-template-rows: auto auto minmax(330px, 1fr) auto;
  gap: 14px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  box-shadow: 0 18px 38px rgba(15, 23, 42, .055);
}
.ex-file-workbench.dragging {
  opacity: .55;
  border-color: #2563eb;
}
.ex-file-workbench-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.ex-file-workbench-head strong {
  display: block;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}
.ex-file-workbench-head span {
  display: block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}
.ex-file-workbench-head .btn {
  flex: 0 0 auto;
  min-width: 118px;
  border-radius: 999px;
  background: #111218;
  color: #fff;
}
.ex-file-count-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}
.ex-file-count-bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(135deg, #8f526b, #bb7890);
}
.ex-file-stack {
  position: relative;
  min-width: 0;
  min-height: 330px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 20%, rgba(219, 234, 254, .78), transparent 38%),
    linear-gradient(180deg, #f8fafc, #fff);
}
.ex-file-stack-item {
  --ex-offset: 0;
  --ex-z: 1;
  position: absolute;
  z-index: var(--ex-z);
  width: min(46%, 430px);
  aspect-ratio: 9 / 16;
  max-height: 350px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transform: translateX(calc(var(--ex-offset) * 128px)) rotate(calc(var(--ex-offset) * 7deg)) scale(calc(1 - (var(--ex-distance) * .04)));
  transition: transform .18s ease, opacity .18s ease;
}
.ex-file-stack-item:not(.active) {
  opacity: .72;
}
.ex-file-stack-item.active {
  box-shadow: none;
}
.ex-file-stack-item img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
}
.ex-file-current {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.ex-file-current-meta {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: #3f444d;
  color: #fff;
}
.ex-file-current-meta strong {
  white-space: nowrap;
  font-size: 17px;
  font-weight: 900;
}
.ex-file-current-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ex-file-current-actions .icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #f8fafc;
  box-shadow: none;
}
.ex-file-current-actions .icon-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.ex-file-current-actions .btn.danger {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  border-color: #f43f5e;
  color: #fff;
  background: #ef3f68;
  box-shadow: none;
}
.ex-file-current-actions .btn:not(.danger) {
  min-height: 38px;
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: none;
}
.ex-file-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ex-file-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
}
.ex-file-dots button.active {
  width: 18px;
  background: #8f526b;
}
.ex-empty {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  color: #64748b;
  background: #fbfdff;
}
.ex-empty strong {
  color: #334155;
}
.ex-empty-upload {
  align-content: center;
  min-height: 260px;
}
.ex-empty-upload span {
  color: #7d8794;
  line-height: 1.65;
}
.ex-empty-upload-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(92px, .36fr);
  gap: 12px;
}
.ex-empty-upload-actions .btn {
  width: 100%;
  min-width: 0;
}
.ex-main-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 20px -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
}
.ex-submit-note {
  margin-right: auto;
  color: #64748b;
  font-size: 13px;
}
.ex-progress-card {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbf8ff 0%, #f8f7fc 38%, #f9f5ff 100%);
  box-shadow: 0 18px 38px rgba(63, 45, 76, .045);
  overflow: hidden;
}
.ex-progress-card .panel-head {
  margin-bottom: 12px;
  padding: 0;
}
.ex-progress-card .panel-head h3 {
  margin: 0;
}
.ex-progress-card .list {
  display: grid;
  gap: 14px;
}
.ex-result-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.ex-result-head {
  align-items: flex-start;
}
.ex-result-head img {
  width: 52px;
  height: 52px;
  border-radius: 6px;
}
.ex-status-pill {
  display: inline-flex;
  margin-top: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 12px;
}
.ex-review-summary-card {
  display: grid;
  gap: 12px;
}
.ex-review-summary-card .ex-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ex-review-summary-card .ex-file-actions .btn {
  min-width: 112px;
}
.ex-review-summary-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  font-weight: 800;
}
.ex-chat-editor {
  gap: 12px;
  padding: 16px;
  border-radius: 10px;
  background: #f8fafc;
}
.ex-chat-row {
  display: grid;
  gap: 8px;
}
.ex-chat-time-row {
  display: grid;
  justify-items: center;
  gap: 8px;
}
.ex-chat-time-badge {
  max-width: 80%;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: #e8edf3;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
}
.ex-chat-bubble {
  width: fit-content;
  max-width: min(100%, 520px);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  text-align: left;
}
.ex-chat-bubble-time {
  color: #64748b;
  font-size: 12px;
}
.ex-chat-bubble-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}
.ex-speaker-me {
  justify-items: end;
}
.ex-speaker-me .ex-chat-bubble {
  background: #dff1ff;
  border-color: #bfe2ff;
}
.ex-speaker-target {
  justify-items: start;
}
.ex-speaker-target .ex-chat-bubble {
  background: #fff;
}
.ex-speaker-unknown {
  justify-items: center;
}
.ex-speaker-unknown .ex-chat-bubble {
  background: #fff8ed;
}
.ex-chat-edit {
  display: grid;
  grid-template-columns: 104px 128px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0 0;
}
.ex-chat-time-edit {
  width: min(260px, 100%);
  grid-template-columns: 1fr;
}
.ex-chat-time-only {
  text-align: center;
}
.ex-chat-speaker,
.ex-chat-time,
.ex-chat-content {
  border-radius: 6px;
  background: #fff;
}
.ex-chat-speaker,
.ex-chat-time {
  height: 38px;
  font-size: 13px;
}
.ex-chat-content {
  min-height: 42px;
  font-size: 14px;
  line-height: 1.55;
}
.ex-speaker-me .ex-chat-content {
  background: #e8f4ff;
  border-color: #bfdbfe;
}
.ex-speaker-target .ex-chat-content {
  background: #fff;
  border-color: #d8dee8;
}
.ex-speaker-unknown .ex-chat-content {
  background: #fff8ed;
  border-color: #fed7aa;
}
.ex-file-actions {
  padding-top: 2px;
}
.ex-preview-block {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.ex-preview-block.wide {
  grid-column: 1 / -1;
}
.ex-preview-block span {
  color: #64748b;
  font-weight: 700;
}
.ex-preview-block p {
  margin: 0;
  color: #1f2937;
  line-height: 1.6;
}
.ex-friendly-error {
  color: #b45309;
}
.ex-chat-empty {
  padding: 14px;
  border: 1px dashed #f59e0b;
  border-radius: 8px;
  color: #92400e;
  background: #fffbeb;
}
.ex-chat-review-modal {
  z-index: 95;
}
.ex-chat-review-card {
  width: min(1080px, calc(100vw - 32px));
  max-height: min(86vh, 860px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 0;
  overflow: hidden;
}
.ex-chat-review-card .modal-fixed-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}
.ex-chat-review-card .modal-fixed-head h3 {
  margin-bottom: 4px;
}
.ex-chat-review-card .modal-scroll-body {
  overflow: auto;
  padding: 18px 24px;
  background: #f8fafc;
}
.ex-chat-review-actions {
  justify-content: flex-end;
  padding: 16px 24px 22px;
  border-top: 1px solid #eef2f7;
  background: rgba(255,255,255,.96);
}
.ex-generating-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
}
.ex-recognizing-card {
  min-height: 150px;
  margin-top: 12px;
}
.ex-generating-card strong {
  color: #334155;
  font-size: 18px;
}
.ex-generating-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}
.ex-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #dbe4ef;
  border-top-color: #2563eb;
  animation: exSpin 1s linear infinite;
}
.ex-generating-dots {
  display: inline-flex;
  gap: 6px;
}
.ex-generating-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #2563eb;
  animation: exPulse 1s ease-in-out infinite;
}
.ex-generating-dots span:nth-child(2) { animation-delay: .15s; }
.ex-generating-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes exSpin {
  to { transform: rotate(360deg); }
}
@keyframes exPulse {
  0%, 100% { transform: translateY(0); opacity: .45; }
  50% { transform: translateY(-4px); opacity: 1; }
}
