.dashboard {
  --dash-paper: #faf9fc;
  --dash-card: #fff;
  --dash-line: #e6e3ed;
  --dash-violet: #ece9fa;
  --dash-ink: #1b1729;
  min-height: 100dvh;
  background: #f5f4f8;
  font-size: .95rem;
}

.dashboard::before { display: none; }
.dashboard h1, .dashboard h2, .dashboard h3 { font-family: var(--display); }
.dashboard h1 { font-size: clamp(2.12rem, 4vw, 3.2rem); font-weight: 650; letter-spacing: -.05em; line-height: 1.06; overflow-wrap: anywhere; }
.dashboard h2 { font-size: 1.27rem; font-weight: 650; letter-spacing: -.024em; line-height: 1.2; overflow-wrap: anywhere; }
.dashboard h3 { font-size: 1.05rem; font-weight: 650; line-height: 1.3; }
.dashboard :is(input, select, textarea, progress) { accent-color: var(--accent); }
.dashboard :is(input, textarea, select) { min-width: 0; color: var(--text); font: inherit; }
.dashboard :is(input:not([type="checkbox"], [type="radio"], [type="file"]), textarea, select) {
  min-height: 44px;
  max-width: 100%;
  padding: 9px 11px;
  border: 1px solid #dcd8e5;
  border-radius: 9px;
  background: #fff;
}
.dashboard :is(input, textarea)::placeholder { color: #777285; }
.dashboard textarea { width: 100%; resize: vertical; }
.dashboard progress { display: block; width: min(100%, 28rem); height: 9px; }
.dashboard :is(dl, dd, dt) { margin: 0; }
.dash-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dash-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100dvh; }
.dash-sidebar { position: sticky; top: 0; display: flex; flex-direction: column; min-width: 0; height: 100dvh; padding: 22px 14px 16px; border-right: 1px solid var(--dash-line); background: var(--dash-paper); overflow: auto; }
.dash-brand { align-self: flex-start; margin: 1px 9px 27px; }
.dash-nav { display: grid; gap: 20px; }
.dash-nav-group { display: grid; gap: 3px; }
.dash-nav-group > p { padding: 0 10px 4px; color: var(--muted); font-size: .77rem; font-weight: 600; }
.dash-nav-group a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 7px 10px; border-radius: 9px; color: #49445c; font-weight: 500; }
.dash-nav-group a svg { flex: 0 0 18px; width: 18px; height: 18px; }
.dash-nav-group a:hover { background: #f0eef6; color: var(--dash-ink); }
.dash-nav-group a[aria-current="page"] { background: var(--dash-violet); color: #4537ba; font-weight: 650; }
.dash-nav-count { margin-left: auto; padding: 1px 7px; border-radius: 8px; background: #eeebf7; color: #473ead; font-size: .75rem; font-variant-numeric: tabular-nums; }
.dash-sidebar-foot { display: grid; gap: 4px; margin-top: auto; padding: 24px 10px 4px; color: var(--muted); font-size: .8rem; }
.dash-sidebar-foot a { display: flex; align-items: center; min-height: 44px; color: var(--dash-ink); font-size: .94rem; font-weight: 600; }
.dash-sidebar-foot a:hover { color: var(--accent); }

.dash-main { min-width: 0; }
.dash-top { position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; padding: 8px clamp(20px, 3.2vw, 52px); border-bottom: 1px solid var(--dash-line); background: rgb(250 249 252 / 95%); backdrop-filter: blur(12px); }
.dash-breadcrumb, .dash-top-controls { display: flex; align-items: center; gap: 10px; }
.dash-breadcrumb { min-width: 0; color: var(--muted); font-size: .9rem; }
.dash-breadcrumb strong { color: var(--dash-ink); font-weight: 600; }
.dash-breadcrumb-slash { color: #aaa4b9; }
.dash-demo-label { padding: 3px 8px; border: 1px solid var(--dash-line); border-radius: 7px; color: var(--muted); font-size: .78rem; font-weight: 600; }
.dashboard .dash-workspace select { min-height: 42px; padding-inline: 9px 8px; cursor: pointer; font-size: .92rem; font-weight: 600; }
.dash-mobile-brand, .dashboard .dash-nav-toggle { display: none; }

.dash-view { width: 100%; max-width: 1480px; margin-inline: auto; padding: clamp(24px, 4vw, 54px) clamp(20px, 3.2vw, 52px) 48px; }
.dash-view:focus { outline: none; }
.dash-page-header { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.dash-page-header > div { min-width: 0; }
.dash-page-header .dash-button { flex: none; }
.dash-page-header h1 + p { margin-top: 9px; }
.dash-eyebrow { margin-bottom: 6px; color: #5245c2; font-size: .84rem; font-weight: 650; }
.dash-muted { color: var(--muted); }
.dash-card { min-width: 0; padding: clamp(15px, 1.75vw, 24px); border: 1px solid var(--dash-line); border-radius: 14px; background: var(--dash-card); }
.dash-view > .dash-split + .dash-card, .dash-view > .dash-card + .dash-card { margin-top: 15px; }
.dash-card-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-card-header h2 + p { margin-top: 4px; }

.dash-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 9px 13px; border: 1px solid #e0dce8; border-radius: 9px; background: #fff; color: var(--dash-ink); font-weight: 600; line-height: 1.25; text-align: center; cursor: pointer; transition: background-color var(--ease), border-color var(--ease), color var(--ease); }
.dash-button:hover { border-color: #bfb5d6; background: #f5f2fb; }
.dash-button--primary { border-color: var(--dash-ink); background: var(--dash-ink); color: #fff; }
.dash-button--primary:hover { border-color: #403464; background: #403464; }
.dash-button--danger { border-color: #edd4dc; color: #98273f; }
.dash-button--danger:hover, .dash-file-remove:hover { border-color: #dfabbb; background: #fff1f4; color: #8d1c34; }
.dash-button:disabled { opacity: .56; cursor: default; }
.dash-button svg { flex: none; }
.dash-link { color: #493ab7; font-weight: 600; text-decoration: underline; text-decoration-color: #cdc4ec; text-underline-offset: .2em; }
.dash-link:hover { text-decoration-color: currentColor; }
.dash-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.dash-toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-toolbar .dash-field { width: min(100%, 23rem); }
.dash-toolbar .dash-muted { align-self: center; }
.dash-field { display: grid; min-width: 0; gap: 5px; font-size: .9rem; font-weight: 550; }
.dash-field > :is(input, textarea, select) { width: 100%; font-weight: 400; }
.dash-form { display: grid; gap: 15px; }
.dash-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: end; }
.dash-check { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.dash-check input { width: 17px; height: 17px; }
.dash-error { color: #99263f; font-size: .88rem; font-weight: 550; }
.dash-empty { padding: 22px 14px; border-radius: 9px; background: #f8f7fb; color: var(--muted); text-align: center; }
.dash-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.dash-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; background: #eeebfa; color: #493ab7; font-size: .79rem; font-weight: 600; }
.dash-status { display: inline-flex; align-items: center; width: fit-content; padding: 4px 8px; border: 1px solid #e6e1f1; border-radius: 7px; background: #f0eef7; color: #514765; font-size: .81rem; font-weight: 600; line-height: 1.25; white-space: nowrap; }
.dash-status[data-status="montage"] { border-color: #e2dcfa; background: #ede8fd; color: #4836a8; }
.dash-status[data-status="preview"] { border-color: #e6dcfc; background: #f1eafd; color: #5b3ca0; }
.dash-status:is([data-status="livre"],[data-status="termine"]) { border-color: #d3ebe3; background: #e7f4ee; color: #265d4a; }

.dash-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 11px; margin-bottom: 17px; }
.dash-stat { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 14px; min-height: 117px; padding: clamp(11px, 1.55vw, 20px); border: 1px solid var(--dash-line); border-radius: 13px; background: #fff; transition: border-color var(--ease), background var(--ease); }
.dash-stat:hover { border-color: #baafdb; background: #fbfaff; }
.dash-stat:last-child { border-color: #ded8f3; background: #ebe7fb; }
.dash-stat:last-child:hover { background: #e4ddfa; }
.dash-stat-label { display: flex; align-items: center; gap: 7px; color: #575069; font-size: .9rem; font-weight: 550; }
.dash-stat-label svg { flex: 0 0 16px; color: #6051bf; }
.dash-stat strong { color: var(--dash-ink); font-size: clamp(1.7rem, 2.8vw, 2.55rem); font-variant-numeric: tabular-nums; font-weight: 650; letter-spacing: -.05em; line-height: 1; }
.dash-overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 15px; }
.dash-production-list, .dash-deadline-list, .dash-file-list, .dash-list, .dash-notification-list { display: grid; gap: 0; padding: 0; margin: 0; list-style: none; }
.dash-production-row, .dash-deadline-list a { display: flex; align-items: center; gap: 11px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--dash-line); }
.dash-production-row:hover strong, .dash-deadline-list a:hover strong { color: var(--accent); }
.dash-project-icon { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-content: center; border-radius: 8px; background: #f1eef9; color: #574db1; }
.dash-project-name { display: grid; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dash-project-name small { color: var(--muted); font-size: .8rem; }
.dash-deadline-list time { flex: 0 0 85px; color: #5749bd; font-size: .84rem; font-weight: 650; white-space: nowrap; }
.dash-deadline-list strong { min-width: 0; overflow-wrap: anywhere; font-size: .91rem; font-weight: 550; }
.dash-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.dash-preview-note { max-width: 1480px; margin-inline: auto; padding: 0 clamp(20px, 3.2vw, 52px) 25px; color: var(--muted); font-size: .86rem; }

.dash-table-wrap { max-width: 100%; overflow: auto; }
.dash-table { width: 100%; border-collapse: collapse; text-align: left; }
.dash-table th, .dash-table td { padding: 10px 9px; border-bottom: 1px solid var(--dash-line); vertical-align: middle; overflow-wrap: anywhere; }
.dash-table th { color: var(--muted); font-size: .82rem; font-weight: 600; }
.dash-table tbody tr:last-child td { border-bottom: 0; }
.dash-table tbody tr:hover { background: #faf9fc; }
.dash-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--dash-line); overflow-wrap: anywhere; }
.dash-row:last-child { border-bottom: 0; }
.dash-row strong { text-align: right; }
.dash-split > .dash-list { align-content: start; gap: 15px; }
.dash-card > .dash-actions { margin-top: 12px; }
.dash-order-progress { margin-block: 13px 15px; }
.dash-order-progress progress { margin-top: 9px; }

.dash-dropzone { display: grid; justify-items: center; align-content: center; gap: 7px; min-height: 128px; margin-block: 10px 14px; padding: 16px; border: 1px dashed #c8bfe6; border-radius: 11px; background: #f8f6fc; text-align: center; }
.dash-dropzone:is(:hover, .is-dragging, [data-dragging]) { border-color: var(--accent); background: #f1edf9; }
.dash-dropzone p { max-width: 52ch; }
.dash-file-empty { padding-block: 8px; }
.dash-file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-block: 10px; border-top: 1px solid var(--dash-line); }
.dash-file strong, .dash-file small { display: block; overflow-wrap: anywhere; }
.dash-file-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-file-actions .dash-button { min-width: 44px; padding-inline: 10px; font-size: .85rem; }
.dash-file-remove { color: #9a2741; }
.dash-script { padding: 17px; border-radius: 9px; background: #f6f3fb; font-size: 1.04rem; line-height: 1.65; overflow-wrap: anywhere; }
.dash-notification { padding-block: 12px; border-bottom: 1px solid var(--dash-line); overflow-wrap: anywhere; }
.dash-notification:last-child { border-bottom: 0; }
.dash-notification-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.dash-notification-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; }
.dash-management-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block: 9px 14px; }
.dash-management-stats > div { padding: 12px; border-radius: 9px; background: #f3f0fa; }
.dash-management-stats dd { font-size: 1.34rem; font-weight: 650; color: var(--dash-ink); }
.dash-management-stats dt { color: var(--muted); }

.dash-dialog { position: fixed; inset: 0; width: min(100% - 24px, 580px); max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: auto; border: 1px solid #e4e0ee; border-radius: 16px; background: #fff; color: var(--text); }
.dash-dialog::backdrop { background: rgb(25 19 41 / 52%); }
.dash-dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 17px; border-bottom: 1px solid var(--dash-line); background: white; }
.dash-dialog-close { flex: 0 0 44px; width: 44px; padding: 0; font-size: 1.4rem; }
.dash-dialog-body { padding: 17px; }
.dash-dialog-toast { margin-top: 12px; color: #5749ad; }
.dash-player { display: grid; justify-items: center; }
.dash-player video { max-width: 100%; max-height: 69dvh; border-radius: 8px; background: #100e18; }
.dash-player audio { max-width: 100%; }
.dash-toast { position: fixed; z-index: 9; right: 16px; bottom: 16px; width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px; background: var(--dash-ink); color: #fff; overflow-wrap: anywhere; }

@media (max-width: 1080px) {
  .dash-layout { grid-template-columns: 184px minmax(0, 1fr); }
  .dash-overview-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .dash-layout { display: block; }
  .dash-sidebar { position: fixed; z-index: 5; top: 63px; right: 10px; left: 10px; display: none; max-height: calc(100dvh - 76px); height: auto; padding: 14px; border: 1px solid var(--dash-line); border-radius: 13px; box-shadow: 0 14px 33px rgb(34 23 62 / 13%); }
  .dashboard[data-dash-nav-open] .dash-sidebar { display: flex; }
  .dash-sidebar .dash-brand, .dash-breadcrumb { display: none; }
  .dash-nav { gap: 13px; }
  .dash-mobile-brand { display: inline-flex; }
  .dash-mobile-brand .brand-mark { flex-basis: 22px; width: 22px; height: 22px; }
  .dash-mobile-brand { gap: 6px; font-size: 1.04rem; }
  .dash-top { min-height: 63px; padding: 7px 12px; gap: 7px; }
  .dashboard .dash-nav-toggle { display: inline-flex; min-height: 44px; margin-left: auto; padding-inline: 9px; font-size: .85rem; }
  .dash-demo-label { display: none; }
  .dashboard .dash-workspace select { min-height: 44px; max-width: 133px; padding-inline: 6px 3px; font-size: .81rem; }
  .dash-view { padding: 24px 14px 35px; }
  .dash-preview-note { padding-inline: 14px; }
  .dash-page-header { align-items: start; flex-direction: column; gap: 12px; margin-bottom: 17px; }
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dash-stat { min-height: 86px; gap: 7px; }
  .dash-stat:last-child { grid-column: span 2; }
  .dash-split { grid-template-columns: minmax(0, 1fr); }
  .dash-card-header { flex-wrap: wrap; }
  .dash-deadline-list time { flex-basis: 72px; }
  .dash-management-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .dash-fields { grid-template-columns: minmax(0, 1fr); }
  .dash-table-wrap { overflow: visible; }
  .dash-table, .dash-table tbody { display: block; }
  .dash-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .dash-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 11px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--dash-line); border-radius: 9px; }
  .dash-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .dash-table td:first-child { grid-column: 1 / -1; }
  .dash-table td[data-label]::before { display: block; margin-bottom: 3px; color: var(--muted); font-size: .76rem; font-weight: 550; content: attr(data-label); }
  .dash-table td:first-child::before { content: none; }
  .dash-file { align-items: start; flex-direction: column; }
  .dash-production-row { flex-wrap: wrap; }
  .dash-production-row .dash-status { margin-left: 46px; }
  .dash-status { white-space: normal; }
}

@media (max-width: 360px) {
  .dash-top { gap: 6px; padding-inline: 9px; }
  .dash-mobile-brand { font-size: 1rem; }
  .dashboard .dash-workspace select { max-width: 117px; }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes dash-dialog-enter {
    from { opacity: 0; transform: translateY(8px) scale(.99); }
    to { opacity: 1; transform: none; }
  }
  .dash-dialog[open] { animation: dash-dialog-enter 220ms ease-out both; }
}
