/* MV Studio global visual refresh - neutral production shell */

:root {
  color-scheme: dark;
  --bg-primary: var(--bg-base);
  --bg-secondary: var(--bg-surface);
  --bg-card: var(--bg-glass);
  --bg: var(--bg-base);
  --panel: var(--bg-surface);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-subtle);
  --accent: var(--accent-gold);
  --accent-strong: var(--accent-primary-2);
  --accent-amber: var(--accent-gold);
  --error: var(--danger);
  --warn: var(--warning);
}

html {
  background: var(--bg-base);
}

body,
body.auth-active {
  color: var(--text-primary) !important;
  background:
    radial-gradient(circle at 18% -12%, rgba(72, 230, 199, .10), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(255, 125, 144, .065), transparent 30%),
    linear-gradient(180deg, #101415 0%, #0a0d0e 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .014) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .42), transparent 70%);
  z-index: 0;
}

#particles {
  opacity: .07 !important;
}

.particle {
  background: rgba(72, 230, 199, .55) !important;
}

.shell,
.container,
.app,
.editor-container {
  color: var(--text-primary);
}

.app {
  padding-top: 32px !important;
}

.container {
  max-width: 1500px !important;
}

.editor-container {
  background: rgba(12, 16, 17, .72) !important;
}

.topbar,
.top-bar,
.auth-nav,
.panel-header,
.panel header,
.ops-panel-header,
.sidebar,
.side-nav,
.nav-panel,
.left-panel,
.tools-sidebar {
  background: rgba(18, 22, 23, .86) !important;
  border-color: rgba(255, 255, 255, .10) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .34) !important;
}

.topbar,
.top-bar,
.auth-nav,
.sidebar,
.side-nav,
.nav-panel,
.left-panel,
.tools-sidebar {
  margin-bottom: 0 !important;
  text-align: left !important;
  animation: none !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.lang-switch {
  background: rgba(18, 22, 23, .82) !important;
  border: 1px solid rgba(255, 255, 255, .105) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .30) !important;
}

.site-brand-hero {
  gap: 8px !important;
  padding-top: 36px;
}

.site-brand-hero .site-brand-copy h1 {
  font-size: clamp(42px, 5.8vw, 72px) !important;
}

.topbar .site-logo-md,
.top-bar .site-logo-md,
.brand .site-logo-md {
  width: 42px !important;
  height: 42px !important;
}

.topbar .site-brand-copy h1,
.top-bar .site-brand-copy h1,
.brand .site-brand-copy h1 {
  font-size: clamp(22px, 2.2vw, 30px) !important;
  line-height: 1.12 !important;
}

.topbar .site-brand-copy p,
.top-bar .site-brand-copy p,
.brand .site-brand-copy p {
  margin-top: 4px !important;
  font-size: 13px !important;
}

.topbar-page-context {
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, .10);
}

.topbar-page-context strong {
  color: var(--text-primary);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 760;
}

.topbar-page-context span {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.topbar-tool-pill,
.topbar-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .055);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-tool-btn:hover {
  background: rgba(255, 255, 255, .085);
  border-color: rgba(72, 230, 199, .28);
  color: var(--text-primary);
}

.topbar-tool-btn.is-danger {
  color: #f0b2b6;
  border-color: rgba(226, 139, 143, .28);
  background: rgba(226, 139, 143, .12);
}

.topbar-tool-btn.is-danger:hover {
  color: #ffd4d6;
  background: rgba(226, 139, 143, .18);
}

h1,
h2,
h3,
.card-title,
.panel-title,
.workflow-card h2,
.card h2,
.brand h1,
.site-brand-copy h1,
.title-group h1,
.auth-product h1,
.auth-card h2 {
  letter-spacing: 0 !important;
}

h1,
.title-group h1,
.card-title,
.panel-title,
.workflow-card h2,
.hint-card h2,
.candidate-title,
.segment-time,
.file-name {
  color: var(--text-primary) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}

.subtitle,
.brand p,
.site-brand-copy p,
.title-group p,
.hint,
.empty,
.status,
.meta-label,
.field-hint,
.auth-switch,
.project-phase,
.segment-index,
.tool span,
.history-meta,
.stat .label,
.ops-card-label,
.ops-logs-line,
.ops-list-item,
.candidate-empty {
  color: var(--text-secondary) !important;
}

label,
.field label,
.field-row label,
.section-label,
th {
  color: rgba(190, 201, 198, .92) !important;
}

.card,
.panel,
.workflow-card,
.hint-card,
.candidate-item,
.project-card,
.output,
.history-item,
.stat,
.table-wrap,
.modal-card,
.ops-card,
.ops-panel,
.auth-card,
.status-toast,
.project-log-box,
.pipeline-step,
.pipeline-metric,
.video-stage,
.empty {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)),
    rgba(20, 24, 25, .84) !important;
  border: 1px solid rgba(255, 255, 255, .105) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-card) !important;
}

.panel,
.workflow-card,
.auth-card,
.modal-card,
.ops-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)),
    rgba(18, 22, 23, .90) !important;
}

.panel-body,
.segments-list,
.preview-panel,
.details-panel {
  background: transparent !important;
}

.card:hover,
.workflow-card:hover,
.project-card:hover,
.ops-card:hover {
  border-color: rgba(72, 230, 199, .30) !important;
  box-shadow: var(--shadow-card-hover) !important;
}

button:not(.auth-password-toggle):not(.topbar-mobile-toggle):not(.btn):not(.ghost):not(.danger):not(.warn):not(.tab):not(.tool):not(.app-btn):not(.linuxdo):not(.auth-sso):not(.auth-nav-button):not(.lang-btn):not(.back-btn):not(.del-btn),
.btn,
.save-btn,
.add-btn,
.small-btn {
  min-height: 36px;
  border-radius: var(--radius-md) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  background: linear-gradient(180deg, #70efd9, #35c9b0) !important;
  color: var(--text-on-accent) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .24) inset, 0 10px 22px rgba(0, 0, 0, .24) !important;
  letter-spacing: 0 !important;
  transition:
    transform var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out) !important;
}

button:not(.auth-password-toggle):not(.topbar-mobile-toggle):not(.btn):not(.ghost):not(.danger):not(.warn):not(.tab):not(.tool):not(.app-btn):not(.linuxdo):not(.auth-sso):not(.auth-nav-button):not(.lang-btn):not(.back-btn):not(.del-btn):hover,
.btn:hover,
.save-btn:hover,
.add-btn:hover,
.small-btn:hover {
  border-color: rgba(72, 230, 199, .52) !important;
  background: linear-gradient(180deg, #99f6e7, #48e6c7) !important;
  color: #03110e !important;
  transform: translateY(-1px);
}

.btn-secondary,
.ghost,
button.ghost,
.back-btn,
button.back-btn,
.auth-sso,
button.auth-sso,
.linuxdo,
button.linuxdo,
.lang-btn:not(.active),
button.lang-btn:not(.active),
.tab,
button.tab,
.pill,
.badge,
.auth-nav-button,
button.auth-nav-button,
.small.btn-ghost,
button.ghost,
a.badge {
  background: rgba(255, 255, 255, .045) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  box-shadow: none !important;
}

.btn-secondary:hover,
.ghost:hover,
button.ghost:hover,
.back-btn:hover,
button.back-btn:hover,
.auth-sso:hover,
button.auth-sso:hover,
.linuxdo:hover,
button.linuxdo:hover,
.lang-btn:not(.active):hover,
button.lang-btn:not(.active):hover,
.tab:hover,
button.tab:hover,
.pill:hover,
.badge:hover,
.auth-nav-button:hover,
button.auth-nav-button:hover,
button.ghost:hover,
a.badge:hover {
  background: rgba(255, 255, 255, .075) !important;
  color: var(--text-primary) !important;
  border-color: rgba(72, 230, 199, .28) !important;
}

.btn-primary,
.auth-primary,
.lang-btn.active,
.tabs button.active,
.tab.active,
.auth-nav-button.active {
  background: linear-gradient(180deg, #53e8cf, #28aa94) !important;
  color: var(--text-on-accent) !important;
  border-color: rgba(72, 230, 199, .36) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 12px 28px rgba(0, 0, 0, .26) !important;
}

.btn-danger,
.danger,
button.danger,
.del-btn,
.badge.danger,
.badge.failed,
.badge.cancelled {
  background: rgba(226, 139, 143, .13) !important;
  color: #f0b2b6 !important;
  border-color: rgba(226, 139, 143, .28) !important;
}

.btn-danger:hover,
.danger:hover,
button.danger:hover,
.del-btn:hover {
  background: rgba(226, 139, 143, .18) !important;
  color: #ffd4d6 !important;
}

.warn,
.badge.warn,
.badge.queued,
.badge.running,
.badge.cancelling,
.status-queued,
.status-analyzing,
.status-planning,
.status-generating,
.status-image_queued,
.status-video_queued,
.status-lipsync_queued,
.status-image_generating,
.status-video_generating,
.status-lipsync_processing {
  background: var(--warning-soft) !important;
  color: #f4ca7a !important;
  border-color: rgba(240, 184, 90, .28) !important;
}

.badge.completed,
.badge.ok,
.status-completed,
.status-composing,
.pipeline-step.done,
.project-stage-pill.done {
  background: rgba(142, 199, 161, .12) !important;
  color: #b8dfc3 !important;
  border-color: rgba(142, 199, 161, .24) !important;
}

.status-failed,
.status.error {
  color: #f0b2b6 !important;
}

.status.ok,
.status-image_done,
.status-video_done,
.status-partial_ready {
  color: #b7d0de !important;
  background: rgba(125, 183, 255, .13) !important;
  border-color: rgba(125, 183, 255, .24) !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea,
select,
.input,
.auth-input-wrap {
  background: rgba(9, 13, 14, .78) !important;
  color: var(--text-primary) !important;
  border: 1px solid rgba(255, 255, 255, .105) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

textarea,
pre {
  font-family: var(--font-mono) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(135, 146, 143, .78) !important;
  opacity: 1 !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):hover,
textarea:hover,
select:hover,
.input:hover {
  background: rgba(13, 18, 18, .88) !important;
  border-color: rgba(255, 255, 255, .16) !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
textarea:focus,
select:focus,
.input:focus,
.auth-input-wrap:focus-within {
  outline: none !important;
  background: rgba(10, 15, 15, .95) !important;
  border-color: rgba(72, 230, 199, .44) !important;
  box-shadow: 0 0 0 3px rgba(72, 230, 199, .11) !important;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent-gold);
}

select,
select option,
select optgroup {
  background-color: #111617 !important;
  color: var(--text-primary) !important;
}

table,
.table-wrap {
  background: transparent !important;
}

th {
  background: rgba(255, 255, 255, .04) !important;
  border-color: rgba(255, 255, 255, .09) !important;
}

td,
.meta-row,
.divider::before,
.divider::after,
.panel header,
.project-log-entry,
.storyboard-box,
.toolbar,
.tabs {
  border-color: rgba(255, 255, 255, .09) !important;
}

tr:hover td {
  background: rgba(255, 255, 255, .045) !important;
}

.tool,
button.tool,
.app-btn,
button.app-btn,
.history-item,
.output,
.stat,
.candidate-item,
.segment-item,
.project-stage-pill,
.project-log-box,
.nav-item,
.menu-item {
  background: rgba(255, 255, 255, .04) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, .095) !important;
  box-shadow: none !important;
}

.tool:hover,
button.tool:hover,
.tool.active,
button.tool.active,
.app-btn:hover,
button.app-btn:hover,
.app-btn.active,
button.app-btn.active,
.segment-item:hover,
.segment-item.active,
.nav-item:hover,
.nav-item.active,
.menu-item:hover,
.menu-item.active {
  background: rgba(255, 255, 255, .09) !important;
  color: var(--text-primary) !important;
  border-color: rgba(72, 230, 199, .26) !important;
}

.tool-icon {
  background: rgba(255, 255, 255, .055) !important;
  color: var(--accent-primary-2) !important;
  border: 1px solid rgba(255, 255, 255, .10);
}

.file-upload {
  background: rgba(255, 255, 255, .045) !important;
  border-color: rgba(255, 255, 255, .11) !important;
  border-radius: var(--radius-md) !important;
}

.file-upload:hover {
  background: rgba(255, 255, 255, .07) !important;
  border-color: rgba(72, 230, 199, .28) !important;
}

.progress-bar,
.projects-shell::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .06) !important;
}

.progress-fill,
.project-card::before {
  background: linear-gradient(90deg, rgba(72, 230, 199, .92), rgba(125, 183, 255, .76)) !important;
}

.projects-shell::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: rgba(139, 154, 151, .38) !important;
  border-radius: var(--radius-pill);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .035);
}

.video-stage {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)),
    rgba(8, 12, 13, .86) !important;
}

.video-shell,
.output img,
.output video,
.thumbs img,
.thumbs video {
  background: #050808 !important;
  border-color: rgba(255, 255, 255, .10) !important;
}

.pipeline-step.active,
.project-stage-pill.active {
  background: rgba(72, 230, 199, .13) !important;
  border-color: rgba(72, 230, 199, .28) !important;
  box-shadow: 0 0 0 1px rgba(72, 230, 199, .08) !important;
}

.pipeline-step.pending,
.project-stage-pill.pending {
  opacity: .70;
}

.status-pill,
.status-badge,
.badge {
  border: 1px solid rgba(255, 255, 255, .10);
}

.modal {
  background: rgba(4, 7, 8, .58) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

pre,
code {
  background: rgba(7, 10, 11, .76) !important;
  color: var(--text-primary) !important;
  border-color: rgba(255, 255, 255, .095) !important;
}

a,
.output a,
.top-bar a,
.auth-nav-link {
  color: #b7d0de;
}

a:hover,
.output a:hover,
.top-bar a:hover,
.auth-nav-link:hover {
  color: var(--accent-primary-2);
}

.site-logo,
.site-logo-sm,
.site-logo-md,
.auth-product img {
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .32)) !important;
}

.video-shell,
.preview-area .empty-state,
.empty-state {
  color: rgba(255, 255, 255, .72) !important;
}

@media (max-width: 760px) {
  .app {
    padding: 20px 12px !important;
  }

  .card,
  .workflow-card,
  .panel,
  .auth-card {
    border-radius: var(--radius-lg) !important;
  }
}
