/* Workspace tools share one accent and adapt without changing the file model. */
.file-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.file-layout.with-inspector {
  grid-template-columns: minmax(0, 1fr) 280px;
}
.file-layout > .library {
  min-width: 0;
}
.inspector {
  position: sticky;
  top: 12px;
  background: #23252c;
  border: 1px solid #ffffff10;
  border-radius: 8px;
  padding: 16px;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  color: #dce0ee;
}
.inspector-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inspector-heading h2 {
  font-size: 14px;
  margin: 0;
}
.inspector-heading button span:not(.fluent-icon) {
  display: none;
}
.inspector h3 {
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  margin: 18px 0 10px;
}
.inspector > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--accent);
}
.inspector-preview {
  margin-top: 12px;
  background: #15171d;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  overflow: hidden;
}
.inspector-preview img,
.inspector-preview video {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
}
.inspector-preview > .fluent-icon {
  width: 52px;
  height: 52px;
  color: var(--accent);
}
.inspector-preview p {
  padding: 12px;
  font-size: 12px;
}
.metadata {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 7px;
  font-size: 11px;
  line-height: 1.7;
}
.metadata dt {
  color: var(--accent);
}
.metadata dd {
  margin: 0;
  word-break: break-word;
}
.inspector-form {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.inspector-field {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--accent-soft);
}
.inspector-field input,
.inspector-field select {
  width: 100%;
  border: 1px solid #ffffff18;
  background: #2a2e39;
  color: #eee;
  border-radius: 5px;
  min-height: 34px;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 12px;
}
.inspector-form button {
  background: var(--accent);
  color: #171d33;
  border: 0;
}
.status-history {
  font-size: 11px;
  line-height: 1.9;
  margin: 0;
  padding-left: 18px;
  color: var(--accent-soft);
}
.inspector > button {
  width: 100%;
  font-size: 11px;
}
.tools {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.tools #kanban span:not(.fluent-icon),
.tools #inspect-toggle span:not(.fluent-icon),
header #commands span:not(.fluent-icon) {
  display: none;
}
header #commands {
  min-width: 34px;
  padding: 7px;
}
.quick-access {
  margin: 16px 0;
}
.quick-access h2 {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.7px;
  padding: 0 12px;
  margin: 10px 0;
}
.quick-access p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--accent);
  padding: 0 12px;
}
.quick-access button {
  width: 100%;
  justify-content: flex-start;
  padding: 8px 12px;
  background: none;
  border: 0;
  color: var(--accent-soft);
  font-size: 11px;
  overflow: hidden;
}
.quick-access button span:not(.fluent-icon) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-access button:hover {
  background: rgb(var(--accent-rgb) / 8%);
}
.storage-meter {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.storage-meter small {
  font-size: 10px;
  line-height: 1.7;
}
.storage-meter progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
}
.search-help {
  font-size: 11px;
  line-height: 1.8;
  color: var(--accent);
  padding: 0 0 12px;
}
.search-help summary {
  cursor: pointer;
  user-select: none;
}
.search-help p {
  max-width: 650px;
  margin: 6px 0;
  padding: 9px;
  background: rgb(var(--accent-rgb) / 6%);
  border-radius: 5px;
}
.selection-box {
  position: fixed;
  pointer-events: none;
  z-index: 990;
  background: rgb(var(--accent-rgb) / 17%);
  border: 1px solid var(--accent);
  border-radius: 2px;
}
.card.drag-source {
  opacity: 0.5;
}
.drop-target {
  outline: 2px solid var(--accent) !important;
  outline-offset: -2px;
  background: rgb(var(--accent-rgb) / 15%) !important;
}
.kanban-board {
  display: flex;
  align-items: stretch;
  gap: 12px;
  overflow: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
  min-height: 360px;
}
.kanban-lane {
  flex: 0 0 230px;
  padding: 12px;
  background: #15171e;
  border: 1px solid #ffffff08;
  border-radius: 7px;
  scroll-snap-align: start;
  position: relative;
}
.kanban-lane[data-drop-stage="folders"] {
  flex-basis: 180px;
}
.kanban-lane h3 {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 12px;
  padding-right: 35px;
}
.lane-count {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 11px;
  color: var(--accent);
}
.kanban-lane .card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px;
  margin: 10px 0;
  min-height: 90px;
}
.kanban-lane .file-name {
  flex-wrap: wrap;
}
.kanban-lane .file-name strong {
  width: 100%;
  font-size: 12px;
}
.kanban-lane .file-name img,
.video-scrub {
  width: 100%;
  height: 115px;
  object-fit: cover;
  border-radius: 5px;
  background: #11141b;
}
.kanban-lane .select-check {
  position: absolute;
  top: 8px;
  left: 8px;
  opacity: 0;
}
.kanban-lane .card:hover .select-check,
.kanban-lane .card.selected .select-check {
  opacity: 1;
}
.kanban-lane .file-name > .fluent-icon {
  width: 28px;
  height: 28px;
  margin: 12px 0;
}
.cards .video-scrub {
  height: 140px;
}
.duplicates-summary {
  font-size: 12px;
  color: var(--accent-soft);
  padding: 0 0 15px;
  line-height: 1.8;
}
.duplicates-summary h2 {
  font-size: 14px;
  margin: 0 0 6px;
}
.duplicates-summary p {
  margin: 6px 0;
}
.duplicate-group {
  padding: 12px;
  margin: 10px 0;
  background: rgb(var(--accent-rgb) / 5%);
  border: 1px solid rgb(var(--accent-rgb) / 13%);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.duplicate-group strong {
  flex-basis: 100%;
  font-size: 11px;
}
.duplicate-group button {
  font-size: 11px;
}
.command-palette {
  width: min(680px, calc(100vw - 30px));
  max-height: 75dvh;
  padding: 14px;
  overflow: hidden;
  background: #242833;
  border-radius: 8px;
}
.palette-head {
  display: flex;
  gap: 8px;
}
.palette-head input {
  width: 100%;
  background: #1b1e28;
  color: #fff;
  border: 1px solid rgb(var(--accent-rgb) / 31%);
  border-radius: 5px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
}
.palette-head button span:not(.fluent-icon) {
  display: none;
}
.palette-results {
  max-height: 55dvh;
  overflow: auto;
  margin: 12px 0;
}
.palette-results button {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: none;
  font-size: 12px;
  color: var(--accent-soft);
}
.palette-results button[aria-selected="true"] {
  background: rgb(var(--accent-rgb) / 15%);
}
.palette-hint {
  font-size: 10px;
  color: var(--accent);
  margin: 10px 0 0;
}
.utility-dialog {
  width: min(520px, calc(100vw - 30px));
  padding: 20px;
  max-height: 80dvh;
  overflow: auto;
}
.utility-dialog > button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  margin: 7px 0;
  padding: 10px;
  font-size: 12px;
}
.utility-dialog h2 {
  font-size: 18px;
}
.utility-dialog p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--accent-soft);
}
.bottom-navigation {
  display: none;
}
.calendar-switcher {
  display: flex;
  gap: 7px;
  margin: 0 0 16px;
}
.calendar-switcher button {
  padding: 8px 15px;
}
.calendar-switcher button[aria-pressed="true"] {
  background: rgb(var(--accent-rgb) / 15%);
  color: var(--accent-soft);
  border-color: rgb(var(--accent-rgb) / 31%);
}
.sessions-timeline {
  max-width: 1000px;
  padding: 15px;
  background: #22252d;
  border-radius: 8px;
}
.timeline-event {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  position: relative;
  padding: 16px 0 16px 20px;
  border-left: 2px solid rgb(var(--accent-rgb) / 25%);
  margin-left: 10px;
}
.timeline-event:before {
  content: "";
  position: absolute;
  left: -6px;
  top: 28px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.timeline-event time {
  font-size: 12px;
  line-height: 2;
  color: var(--accent);
}
.timeline-event .session-card {
  margin: 0;
}
.timeline-event .session-card-body button {
  font-size: 12px;
}
.command-bar #upload {
  white-space: nowrap;
}
.card {
  touch-action: pan-y;
}
.details-list .card {
  touch-action: pan-x pan-y;
}
html[data-theme="light"] .inspector,
html[data-theme="light"] .utility-dialog,
html[data-theme="light"] .command-palette,
html[data-theme="light"] .sessions-timeline {
  background: #fff;
  color: #252c3b;
  border-color: #dde2ed;
}
html[data-theme="light"] .inspector-field,
html[data-theme="light"] .status-history,
html[data-theme="light"] .metadata dt,
html[data-theme="light"] .utility-dialog p,
html[data-theme="light"] .timeline-event time,
html[data-theme="light"] .search-help,
html[data-theme="light"] .duplicates-summary {
  color: #58627a;
}
html[data-theme="light"] .inspector-field input,
html[data-theme="light"] .inspector-field select,
html[data-theme="light"] .palette-head input {
  background: #f7f8fb;
  color: #27324c;
  border-color: var(--accent-soft);
}
html[data-theme="light"] .inspector-preview,
html[data-theme="light"] .kanban-lane {
  background: #eef1f8;
  border-color: #dfe4f0;
}
html[data-theme="light"] .palette-results button {
  color: #27324c;
}
html[data-theme="light"] .quick-access button,
html[data-theme="light"] .quick-access h2,
html[data-theme="light"] .quick-access p {
  color: #57627d;
}
html[data-theme="light"] .calendar-switcher button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.file-layout > [hidden] {
  display: none !important;
}
@media (max-width: 1200px) {
  .file-layout.with-inspector {
    grid-template-columns: minmax(0, 1fr) 245px;
  }
  .inspector {
    padding: 12px;
  }
  .cards {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  }
  header .search {
    width: 220px;
  }
}
@media (max-width: 900px) {
  .file-layout.with-inspector {
    grid-template-columns: minmax(0, 1fr);
  }
  .inspector {
    display: none;
  }
  .mobile-inspector-open .inspector {
    display: block;
    position: fixed;
    right: 15px;
    top: 80px;
    bottom: 82px;
    width: min(340px, calc(100vw - 30px));
    max-height: none;
    z-index: 900;
    box-shadow: 0 15px 60px #0008;
  }
  .timeline-event {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .command-bar button {
    padding: 8px;
  }
  .command-bar button span:not(.fluent-icon) {
    display: none;
  }
  .command-bar #upload span {
    display: inline-block;
  }
  .search {
    flex: 1;
  }
  .kanban-lane {
    flex-basis: 220px;
  }
}
@media (max-width: 560px) {
  aside {
    display: none !important;
  }
  #menu-toggle {
    display: none !important;
  }
  main {
    padding-bottom: 90px;
  }
  header {
    gap: 6px;
  }
  header .navigation-buttons {
    order: 0;
  }
  header .address-bar {
    flex: 1;
    flex-basis: auto;
    width: auto;
    min-width: 0;
  }
  header .search {
    flex-basis: calc(100% - 100px);
    width: calc(100% - 100px);
  }
  header #theme-toggle,
  header #commands {
    flex-shrink: 0;
  }
  #status-bar {
    position: sticky;
    bottom: 68px;
    background: #191b22;
    padding: 10px 0;
    z-index: 3;
  }
  .bottom-navigation {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 950;
    background: #242732ee;
    backdrop-filter: blur(18px);
    border-top: 1px solid #ffffff12;
    padding: 5px 4px max(5px, env(safe-area-inset-bottom));
    gap: 2px;
    box-shadow: 0 -6px 25px #0002;
  }
  .bottom-navigation button {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-height: 56px;
    padding: 6px 2px;
    background: none;
    border: 0;
    font-size: 10px;
    color: var(--accent);
  }
  .bottom-navigation button.active {
    color: var(--accent-soft);
    background: rgb(var(--accent-rgb) / 11%);
    border-radius: 6px;
  }
  .bottom-navigation .fluent-icon {
    width: 21px;
    height: 21px;
  }
  html[data-theme="light"] .bottom-navigation,
  html[data-theme="light"] #status-bar {
    background: #f6f8feee;
    color: #333f58;
  }
  html[data-theme="light"] .bottom-navigation button {
    color: #556580;
  }
  html[data-theme="light"] .bottom-navigation button.active {
    color: var(--accent);
    background: var(--accent-soft);
  }
  .library {
    padding: 12px 9px;
  }
  .tools {
    gap: 4px;
  }
  .tools button {
    min-width: 34px;
  }
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards .file-name img,
  .cards .video-scrub {
    height: 110px;
  }
  .selection-box {
    display: none;
  }
  .select-check {
    opacity: 1 !important;
  }
  #toast {
    bottom: 83px;
    max-width: calc(100vw - 24px);
    width: max-content;
    font-size: 12px;
    padding: 10px 12px;
  }
  .command-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .command-bar button {
    flex-shrink: 0;
  }
  .command-palette {
    margin-top: 12dvh;
  }
  .sessions-timeline {
    padding: 12px;
  }
  .utility-dialog button {
    min-height: 42px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .inspector {
    animation: panel-enter 0.2s ease-out;
  }
  .kanban-lane .card {
    animation: panel-enter 0.15s ease-out;
  }
  .palette-results button {
    transition: background 0.12s;
  }
  @keyframes panel-enter {
    from {
      opacity: 0;
      transform: translateY(5px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

.cards .file-name.has-preview > .fluent-icon {
  width: 18px;
  height: 18px;
  margin: 9px 0 0;
}
.cards .file-name.has-preview strong {
  width: calc(100% - 26px);
  margin-top: 9px;
}
.kanban-lane .file-name.has-preview > .fluent-icon {
  width: 17px;
  height: 17px;
  margin: 6px 0;
}
.kanban-lane .file-name.has-preview strong {
  width: calc(100% - 25px);
}

.command-bar {
  scrollbar-width: none;
}
.command-bar::-webkit-scrollbar {
  display: none;
}

.file-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  padding: 10px 16px;
  background: var(--accent);
  color: #19213d;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 8px 30px #0004;
}
.drag-source {
  opacity: 0.5;
}
.inline-name {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  width: 100%;
  margin-top: 6px;
}
.inline-name-input {
  font: inherit !important;
  font-weight: 500 !important;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
  padding: 4px 6px;
  color: #f3f3f6 !important;
  background: #1c1d22 !important;
  border: 1px solid var(--accent) !important;
  border-radius: 4px !important;
  outline: none !important;
  box-shadow: none !important;
  user-select: text;
  cursor: text;
}
.inline-name-input:focus,
.inline-name-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
.inline-name-error {
  font-size: 11px;
  line-height: 1.45;
  color: #ff8c98 !important;
  white-space: normal;
  word-break: break-word;
}
.inline-name-error:empty {
  display: none;
}
.inline-name-cancel {
  align-self: flex-start;
  font-size: 10px;
  min-height: 22px;
  padding: 2px 6px;
  background: transparent;
}
.inline-name-cancel[hidden] {
  display: none !important;
}
.details-list .inline-name {
  margin: 0;
  align-self: center;
}
.cards .file-name.has-preview .inline-name,
.kanban-lane .file-name.has-preview .inline-name {
  flex-basis: calc(100% - 26px);
  width: calc(100% - 26px);
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 12px;
  justify-content: space-between;
  width: 100%;
  border-top: 1px solid #ffffff10;
  padding-top: 8px;
}
.card-actions .icon-action {
  padding: 5px;
  min-height: 28px;
  min-width: 28px;
  border: 0;
  background: transparent;
  color: #9a9ca5;
}
.card-actions .icon-action:hover {
  color: var(--accent-soft);
  background: rgb(var(--accent-rgb) / 13%);
}
.card-actions .icon-action span:not(.fluent-icon) {
  display: none;
}
.card-actions .icon-action .fluent-icon {
  width: 17px;
  height: 17px;
}
.card-actions .icon-action[aria-pressed="true"] {
  color: var(--accent-soft);
}
.details-list .card-actions {
  border: 0;
  margin: 0;
  padding: 0;
  gap: 0;
  justify-content: flex-end;
  width: 140px;
}
.details-heading,
.details-list .card {
  grid-template-columns: 28px var(--columns);
  min-width: 1000px;
}
.details-heading > div:last-child {
  font-size: 12px;
  color: #9a9ca5;
}
.intro #subtitle,
.overview-card small,
.toolbar #count,
.file-size,
.modified,
.file-type,
.storage p,
.storage small,
.quick-access p,
.side-title,
.search-help,
.workflow button,
.metadata dt,
.status-history,
.calendar-note,
.palette-hint,
.session-card-body p {
  color: #9a9ca5;
}
.details-list .card > span {
  color: #9a9ca5;
}
.app-dialog {
  width: min(450px, calc(100vw - 32px));
  padding: 24px;
  background: #1c1d22;
  border: 1px solid #ffffff18;
  border-radius: 8px;
  color: #f3f3f6;
  box-shadow: 0 20px 80px #0008;
}
.app-dialog h2 {
  font-size: 18px;
  margin: 0 0 12px;
  line-height: 1.5;
}
.app-dialog p {
  font-size: 13px;
  line-height: 1.8;
  color: #b8bbc5;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 24px;
}
.app-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.app-dialog-actions button {
  padding: 9px 16px;
  border-radius: 5px;
  background: #292b34;
  color: #f1f2f6;
  border: 1px solid #ffffff14;
  min-height: 36px;
}
.app-dialog-actions .app-dialog-confirm {
  background: var(--accent);
  color: #171c31;
  border: 1px solid var(--accent);
}
.app-dialog-actions .app-dialog-confirm:hover {
  background: var(--accent);
}
.app-dialog::backdrop {
  background: #0008;
  backdrop-filter: blur(4px);
}
#toast {
  max-width: calc(100vw - 32px);
  width: max-content;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 1002;
}
#toast > span {
  line-height: 1.6;
}
#toast button {
  color: var(--accent-soft);
  white-space: nowrap;
  margin-left: 0;
}
html[data-theme="light"] .app-dialog {
  background: #1c1d22;
  color: #f3f3f6;
}
html[data-theme="light"] .app-dialog-actions button {
  background: #292b34;
  color: #f1f2f6;
}
html[data-theme="light"] .app-dialog-actions .app-dialog-confirm {
  background: var(--accent);
  color: #171c31;
}
html[data-theme="light"] .inline-name-input {
  background: #1c1d22 !important;
  color: #f3f3f6 !important;
}
html[data-theme="light"] .card-actions .icon-action,
html[data-theme="light"] .workflow button,
html[data-theme="light"] .metadata dt,
html[data-theme="light"] .calendar-note {
  color: #626674;
}
html[data-theme="light"] .card-actions .icon-action:hover {
  background: var(--accent-soft);
  color: #334e87;
}
@media (max-width: 560px) {
  .card-actions {
    gap: 0;
  }
  .card-actions .icon-action {
    min-width: 25px;
    padding: 4px;
    min-height: 32px;
  }
  .card-actions .icon-action .fluent-icon {
    width: 16px;
    height: 16px;
  }
  .inline-name-input {
    font-size: 16px !important;
  }
  .app-dialog {
    padding: 20px;
  }
  .app-dialog-actions button {
    min-height: 42px;
  }
  #toast {
    font-size: 12px;
  }
}

.card-meta {
  font-size: 11px;
  line-height: 1.5;
  color: #9a9ca5;
  padding-top: 7px;
}
html[data-theme="light"] .card-meta {
  color: #626674;
}
