/* Pardava Video Editor — dark professional workspace, flat, no decoration */
.ve-page { padding: 32px 0 8px; }
.ve-title { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 10px 0 8px; line-height: 1.5; }
.ve-lead { color: var(--text-muted); max-width: 760px; line-height: 2; margin-bottom: 14px; }
.ve-page .wd-hero-pills { margin-bottom: 22px; }

.ve-shell { width: min(1600px, 98vw); margin-inline: auto; }

.ve-restore {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--accent); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 14px;
}
.ve-restore p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.ve-restore__actions { display: flex; gap: 10px; }

.ve-app {
  display: flex; flex-direction: column; gap: 10px;
  height: clamp(660px, 90vh, 960px);
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow);
}
.ve-app[data-state="empty"] .ve-timeline { opacity: 0.75; }

.ve-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
}
.ve-name {
  font: inherit; font-weight: 700; color: var(--text);
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  padding: 6px 10px; min-width: 0; width: 220px;
}
.ve-name:hover { border-color: var(--border); }
.ve-name:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.ve-save-state { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }
.ve-save-state.is-dirty { color: var(--accent); }
.ve-toolbar__group { display: flex; align-items: center; gap: 8px; }
.ve-toolbar__group:last-child { margin-inline-start: auto; }

.ve-btn {
  font: inherit; font-size: 0.82rem; font-weight: 600;
  color: var(--text); background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
.ve-btn:hover:not(:disabled) { border-color: var(--accent); }
.ve-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ve-btn.is-on { border-color: var(--accent); color: var(--accent); }
.ve-btn--danger:hover:not(:disabled) { border-color: #dc5a5a; color: #e88; }
.ve-btn--play { min-width: 76px; }

.ve-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 12px; }
.ve-field--inline { flex-direction: row; align-items: center; margin-bottom: 0; gap: 6px; }
.ve-field input[type="text"], .ve-field input[type="number"], .ve-field select, .ve-field textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; width: 100%;
}
.ve-field input:focus, .ve-field select:focus, .ve-field textarea:focus { outline: none; border-color: var(--accent); }
.ve-field input[type="color"] { padding: 2px; height: 34px; cursor: pointer; }
.ve-field input[type="range"] { accent-color: var(--accent); }
.ve-custom-size input { width: 76px; }
.ve-field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.ve-workspace {
  display: grid; grid-template-columns: 276px minmax(0, 1fr) 308px; gap: 10px;
  flex: 1; min-height: 0;
}
.ve-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px; overflow-y: auto; min-height: 0;
}
.ve-h { font-size: 0.85rem; font-weight: 700; margin: 14px 0 8px; }
.ve-h:first-child { margin-top: 0; }
.ve-hint { font-size: 0.78rem; color: var(--text-dim); line-height: 1.9; }

.ve-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ve-tab {
  flex: 1; font: inherit; font-size: 0.8rem; font-weight: 600;
  background: transparent; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 4px; cursor: pointer;
}
.ve-tab.is-active { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }

.ve-dropzone {
  border: 2px dashed var(--border-strong); border-radius: 10px;
  padding: 20px 12px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.ve-dropzone strong { font-size: 0.85rem; }
.ve-dropzone span { font-size: 0.75rem; color: var(--text-dim); }
.ve-dropzone.is-over, .ve-dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.ve-import-progress { margin-top: 10px; font-size: 0.78rem; color: var(--text-muted); }
.ve-import-progress progress { width: 100%; }

.ve-media-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ve-media-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 6px;
}
.ve-media-item img { width: 64px; height: 40px; object-fit: cover; border-radius: 5px; background: #000; display: block; }
.ve-media-item__meta { min-width: 0; }
.ve-media-item__name { font-size: 0.78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ve-media-item__sub { font-size: 0.7rem; color: var(--text-dim); }
.ve-media-item__actions { display: flex; flex-direction: column; gap: 4px; }
.ve-media-item__actions .ve-btn { padding: 4px 10px; font-size: 0.72rem; }
.ve-media-item.is-missing { border-color: #dc5a5a; }

.ve-textpresets { display: flex; flex-direction: column; gap: 8px; }
.ve-shortcuts { list-style: none; padding: 0; margin: 0 0 8px; font-size: 0.78rem; color: var(--text-muted); }
.ve-shortcuts li { margin-bottom: 6px; }
.ve-shortcuts kbd, .ve-kbd {
  font-family: inherit; font-size: 0.72rem; background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 7px;
}
.ve-caps { list-style: none; padding: 0; margin: 0; font-size: 0.78rem; color: var(--text-muted); }
.ve-caps li { margin-bottom: 6px; }
.ve-caps .ok { color: #4ade80; }
.ve-caps .no { color: #e88; }

.ve-stage { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.ve-stage__wrap {
  position: relative; flex: 1; min-height: 0;
  background: #000; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ve-stage__wrap:fullscreen { border-radius: 0; }
#ve-canvas { max-width: 100%; max-height: 100%; display: block; background: #000; }
.ve-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px;
  align-items: center; justify-content: center; text-align: center;
  background: rgba(0, 0, 0, 0.72); color: #e8edf5; padding: 24px; z-index: 3;
}
.ve-overlay p { margin: 0; font-size: 0.88rem; max-width: 420px; line-height: 2; }
.ve-overlay progress { width: min(320px, 80%); }
.ve-transport {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
}
.ve-time { font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--text-muted); direction: ltr; }
.ve-time #ve-time-cur { color: var(--text); font-weight: 700; }
.ve-transport input[type="range"] { accent-color: var(--accent); width: 90px; }

.ve-inspector .ve-kf { border: 1px solid var(--border); border-radius: 8px; padding: 8px; margin-bottom: 10px; }
.ve-kf__head { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; font-weight: 700; margin-bottom: 6px; }
.ve-kf__list { list-style: none; margin: 0 0 6px; padding: 0; font-size: 0.75rem; color: var(--text-muted); }
.ve-kf__list li { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.ve-kf__list button { background: none; border: none; color: #e88; cursor: pointer; font: inherit; }
.ve-cliphead { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ve-cliphead .ve-kind { font-size: 0.72rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 5px; padding: 1px 8px; }

.ve-timeline {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px 10px; height: 296px;
  display: flex; flex-direction: column; gap: 6px;
}
.ve-tlbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ve-tlbar .ve-btn { padding: 5px 11px; font-size: 0.75rem; }
.ve-tlbar__zoom { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.ve-tlbar__zoom input[type="range"] { width: 110px; accent-color: var(--accent); }
.ve-tlbar__dur { font-size: 0.75rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.ve-tlscroll { flex: 1; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.ve-tlbody { position: relative; min-height: 100%; }
#ve-ruler { display: block; position: sticky; top: 0; z-index: 5; background: var(--bg-elevated); border-bottom: 1px solid var(--border); cursor: ew-resize; }
.ve-playhead {
  position: absolute; top: 0; bottom: 0; width: 2px; background: #f43f5e; z-index: 6;
  pointer-events: none;
}
.ve-playhead::before {
  content: ""; position: absolute; top: 0; left: -6px;
  border: 7px solid transparent; border-top: 9px solid #f43f5e;
}
.ve-track { display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid var(--border); }
.ve-track__label {
  font-size: 0.72rem; font-weight: 700; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-inline-end: 1px solid var(--border); background: var(--bg-elevated);
  position: sticky; left: 0; z-index: 4; padding: 4px 2px;
}
.ve-track__label span { font-weight: 400; font-size: 0.66rem; }
.ve-lane { position: relative; height: 54px; }
.ve-track[data-track="A1"] .ve-lane { height: 62px; }
.ve-clip {
  position: absolute; top: 5px; bottom: 5px; border-radius: 6px; overflow: hidden;
  background: #1e3a5f; border: 1px solid #3b82f6; cursor: grab;
  font-size: 0.68rem; color: #dbeafe; user-select: none;
}
.ve-clip.is-selected { border-color: #f43f5e; box-shadow: 0 0 0 1px #f43f5e; }
.ve-clip.is-missing { border-style: dashed; border-color: #dc5a5a; }
.ve-clip__label { padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.ve-clip__wave { position: absolute; inset: auto 0 0 0; height: 22px; opacity: 0.8; }
.ve-clip[data-kind="audio"] { background: #14532d; border-color: #22c55e; color: #dcfce7; }
.ve-clip[data-kind="image"] { background: #713f12; border-color: #eab308; color: #fef9c3; }
.ve-clip[data-kind="text"] { background: #4c1d95; border-color: #a78bfa; color: #ede9fe; }
.ve-handle {
  position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 2;
}
.ve-handle--l { left: 0; border-inline-start: 3px solid rgba(255, 255, 255, 0.55); }
.ve-handle--r { right: 0; border-inline-end: 3px solid rgba(255, 255, 255, 0.55); }

.ve-statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 0.78rem; color: var(--text-muted);
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px;
}
.ve-statusbar.is-error { border-color: #dc5a5a; color: #f0a3a3; }
#ve-counts { white-space: nowrap; }

.ve-modal {
  position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center;
  background: rgba(4, 8, 16, 0.7); padding: 20px;
}
.ve-modal__box {
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius); padding: 24px; width: min(560px, 94vw); max-height: 90vh; overflow-y: auto;
}
.ve-modal__box h2 { margin: 0 0 10px; font-size: 1.1rem; }
.ve-modal__box progress { width: 100%; margin: 10px 0; }
.ve-modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
#ve-exp-preview { width: 100%; border-radius: 8px; background: #000; margin: 10px 0; max-height: 300px; }
#ve-exp-download { display: inline-block; margin-bottom: 6px; }

.ve-page .wd-faq { padding: 56px 0; }

@media (max-width: 1100px) {
  .ve-workspace { grid-template-columns: 240px minmax(0, 1fr); }
  .ve-inspector { grid-column: 1 / -1; max-height: 340px; }
  .ve-app { height: auto; min-height: 90vh; }
  .ve-stage { min-height: 340px; }
}
@media (max-width: 760px) {
  .ve-workspace { grid-template-columns: 1fr; }
  .ve-media { max-height: 300px; }
  .ve-stage { min-height: 300px; }
  .ve-timeline { height: 260px; }
  .ve-toolbar__group:last-child { margin-inline-start: 0; }
  .footer-groups { grid-template-columns: 1fr 1fr; }
}
