:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #182b35;
  background: #f6f8f8;
  font-synthesis: none;
  --teal: #12635d;
  --line: #dce5e4;
  --muted: #61747c;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
}
button {
  border: 0;
}
button,
.secondary,
.primary {
  min-height: 42px;
  border-radius: 9px;
}
.topbar {
  height: 88px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: #fff;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 2.6px;
  margin-top: 4px;
  color: var(--muted);
}
.mark {
  background: var(--teal);
  color: white;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-size: 14px;
  letter-spacing: -1px;
}
.staff-welcome {
  margin: clamp(3rem, 14vh, 8rem) auto;
  max-width: 38rem;
  padding: 0 1.5rem;
}
.staff-welcome p { line-height: 1.55; margin: 1rem 0 1.5rem; }
.staff-welcome .primary { display: inline-flex; align-items: center; text-decoration: none; }
.local-badge {
  font-size: 12px;
  color: var(--teal);
  background: #e7f1ed;
  border: 1px solid #d0e4db;
  border-radius: 30px;
  padding: 7px 12px;
}
.workspace-notice {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  padding: 10px 24px;
  background: #fff8e8;
  border-bottom: 1px solid #e9d9b2;
  color: #6e581e;
  font-size: 12px;
  line-height: 1.5;
}
.layout {
  display: grid;
  grid-template-columns: 245px 1fr;
  max-width: 1700px;
  margin: auto;
}
aside {
  padding: 36px 24px;
  min-height: calc(100vh - 88px);
  border-right: 1px solid var(--line);
  background: #fcfdfd;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
  color: var(--muted);
  margin: 0 0 14px;
}
.section-label {
  margin-top: 32px;
}
.nav-all,
.category,
.folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  background: transparent;
  color: #52676d;
  margin: 3px 0;
  border-radius: 8px;
  gap: 8px;
  overflow-wrap: anywhere;
}
.nav-all.active,
.category.active,
.folder.active {
  background: #e4f0ec;
  color: #12554f;
  font-weight: 700;
}
.queue-view {
  background: #f0f6f3;
  color: #275d55;
  border: 1px solid #dbe7e2;
  font-weight: 650;
}
.category span {
  font-size: 11px;
}
.folder-head {
  margin-top: 32px;
  margin-bottom: 8px;
}
.folder-head .eyebrow {
  margin: 0;
}
.text-button {
  color: var(--teal);
  background: none;
  font-weight: 600;
  font-size: 12px;
  padding: 5px;
}
.folder {
  padding-left: 12px;
  min-height: 36px;
  font-size: 12px;
}
.folder:hover {
  background: #e4f0ec;
  color: #12554f;
}
.folder-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.folder-path button {
  min-height: 32px;
  text-align: left;
}
.current-folder {
  font-weight: 700;
}
#folders {
  max-height: 300px;
  overflow-y: auto;
  padding: 2px;
}
.aside-note {
  display: flex;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 44px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.aside-note strong {
  color: #344e57;
  font-size: 11px;
}
.aside-note p {
  margin: 3px 0;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #309778;
  margin-top: 6px;
  flex-shrink: 0;
}
main {
  min-width: 0;
  padding: 46px 44px 110px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.accent {
  color: var(--teal);
  margin-bottom: 10px;
}
h1 {
  font-size: 34px;
  letter-spacing: -1.3px;
  line-height: 1.14;
  margin: 0 0 13px;
  font-weight: 680;
}
.subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.secondary {
  border: 1px solid #cad8d6;
  background: white;
  color: #274b50;
  padding: 10px 15px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.primary {
  background: var(--teal);
  color: white;
  padding: 11px 18px;
  font-size: 12px;
  font-weight: 650;
}
.toolbar {
  display: flex;
  gap: 12px;
  margin: 32px 0 16px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid #cddbd8;
  border-radius: 10px;
  flex: 1;
  min-width: 150px;
  padding: 0 14px;
}
.search span {
  font-size: 26px;
  color: #738b8d;
}
.search input {
  width: 100%;
  border: 0;
  min-height: 46px;
  background: none;
  font-size: 13px;
  outline: none;
}
.search:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
select,
input,
textarea {
  border: 1px solid #cddbd8;
  border-radius: 8px;
  background: white;
  color: #304d56;
  padding: 10px 12px;
  max-width: 100%;
}
select {
  font-size: 12px;
}
.toolbar select {
  min-width: 0;
  max-width: 180px;
}
.sync-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: #edf3f1;
  border: 1px solid #dbe7e2;
  border-radius: 11px;
  padding: 15px 17px;
}
.sync-bar strong {
  font-size: 12px;
  display: block;
}
.sync-bar span {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  display: block;
  margin-top: 5px;
  max-width: 360px;
}
.sync-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sync-actions select {
  max-width: 180px;
  min-width: 120px;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 32px 0 18px;
}
.results-heading h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.3px;
  margin: 0;
  overflow-wrap: anywhere;
}
#result-count {
  flex-shrink: 0;
  margin-left: 12px;
}
#active-filters {
  margin: -12px 0 18px;
  overflow-wrap: anywhere;
}
#queue-hint {
  margin: -6px 0 16px;
}
#queue-hint:not([hidden]) + #active-filters {
  margin-top: -8px;
}
#detail-loading {
  margin: 0 0 16px;
}
.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border: 1px solid #dce5e3;
  border-radius: 12px;
  overflow: hidden;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px #1c4a3b0c;
}
.card.selected {
  border-color: #2b887a;
  box-shadow: 0 0 0 1px #2b887a;
}
.card-visual {
  aspect-ratio: 1.4;
  position: relative;
  background: #e8edeb;
  display: grid;
  place-items: center;
}
.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
}
.card-open {
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: 0;
}
.card-open:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -4px;
}
.file-symbol {
  color: #748d8b;
  text-align: center;
  font-size: 28px;
  line-height: 1.2;
}
.file-symbol small {
  display: block;
  margin-top: 8px;
  font-size: 11px;
}
.card-check {
  position: absolute;
  top: 11px;
  left: 11px;
  display: flex;
  z-index: 1;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 8px #17372a18;
  padding: 3px;
}
.card-check input {
  margin: 0;
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
  cursor: pointer;
}
.type-badge {
  position: absolute;
  bottom: 10px;
  left: 11px;
  background: #ffffffdf;
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #36554f;
}
.card-body {
  padding: 15px;
}
.card-title {
  background: none;
  padding: 0;
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 650;
  min-height: 0;
  display: block;
  overflow-wrap: anywhere;
  color: #213e47;
}
.card-meta {
  margin-top: 7px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #7b8e93;
  font-size: 10px;
}
.legacy-category {
  margin: 7px 0 0;
  color: #6e581e;
  font-size: 11px;
  line-height: 1.45;
}
.card-folder {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.tag-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 11px;
}
.tag-chip {
  font-size: 9px;
  border: 1px solid #e0e8e4;
  background: #f7faf8;
  padding: 3px 6px;
  border-radius: 5px;
  color: #57776e;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.notice {
  padding: 13px 15px;
  background: #fff8e8;
  border: 1px solid #e9d9b2;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.6;
  margin-top: 22px;
  color: #6e581e;
}
.notice.error {
  background: #fff0ed;
  border-color: #e3c3bc;
  color: #88483a;
}
.empty {
  border: 1px dashed #c8dad4;
  border-radius: 14px;
  text-align: center;
  padding: 58px 28px;
  color: var(--muted);
  margin-top: 18px;
  background: #fbfdfc;
}
.empty-icon {
  font-size: 39px;
  color: #5a9180;
}
.empty h3 {
  font-size: 20px;
  font-weight: 600;
  color: #345a53;
}
.empty p {
  font-size: 13px;
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}
.empty .secondary {
  margin-top: 18px;
}
.loading {
  font-size: 13px;
  padding: 35px;
  color: var(--muted);
  text-align: center;
}
.more {
  margin: 28px auto;
  display: flex;
}
.selection-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid #ceded6;
  border-radius: 13px;
  background: #fff;
  padding: 12px 16px;
  box-shadow: 0 8px 32px #12392f22;
  z-index: 3;
  max-width: calc(100% - 24px);
  white-space: nowrap;
}
.selection-bar strong {
  font-size: 13px;
}
.selection-bar[hidden],
.more[hidden],
[hidden] {
  display: none !important;
}
dialog {
  border: 1px solid #d3e0dc;
  border-radius: 16px;
  width: min(690px, calc(100% - 24px));
  max-height: calc(100% - 32px);
  padding: 24px;
  color: #203e48;
  box-shadow: 0 20px 100px #14342d55;
}
dialog::backdrop {
  background: #18352d88;
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-top .eyebrow {
  margin: 0;
}
.icon-button {
  background: #edf3f1;
  font-size: 23px;
  width: 34px;
  min-height: 34px;
  border-radius: 50%;
  color: #506e68;
}
.detail-preview {
  background: #eaf0ec;
  margin: 20px 0;
  border-radius: 9px;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-preview img,
.detail-preview video {
  max-width: 100%;
  max-height: 320px;
  display: block;
  border-radius: 8px;
}
.detail-preview p {
  font-size: 13px;
  padding: 25px;
}
dialog h2 {
  font-size: 20px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  margin: 16px 0 5px;
}
form {
  margin-top: 23px;
}
form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin: 16px 0;
}
form label input,
form label select,
form label textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  font-size: 13px;
}
form label small {
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
}
#category-hint {
  margin: -8px 0 16px;
}
.dialog-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 22px;
}
#detail-status {
  font-size: 12px;
  line-height: 1.6;
  color: #1a7064;
}
@media (min-width: 1500px) {
  .grid {
    grid-template-columns: repeat(4, minmax(205px, 1fr));
  }
}
@media (max-width: 1050px) {
  .layout {
    grid-template-columns: 200px 1fr;
  }
  main {
    padding: 32px 25px 110px;
  }
  .intro {
    align-items: flex-start;
    flex-direction: column;
  }
  .sync-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .sync-actions {
    width: 100%;
  }
  .sync-actions select {
    flex: 1;
    max-width: none;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search {
    flex-basis: 100%;
  }
  .toolbar select {
    flex: 1;
    min-width: 0;
    max-width: none;
  }
}
@media (max-width: 650px) {
  .topbar {
    height: 72px;
    padding: 0 18px;
  }
  .layout {
    display: block;
  }
  aside {
    padding: 16px 18px;
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  aside > .eyebrow,
  .section-label,
  .aside-note {
    display: none;
  }
  .workspace-notice {
    justify-content: flex-start;
    padding: 9px 18px;
  }
  .folder-head {
    margin-top: 12px;
  }
  #folders {
    display: flex;
    max-height: 124px;
    flex-wrap: wrap;
    gap: 4px 6px;
  }
  #folders .folder {
    width: auto;
    max-width: 100%;
    background: #edf3f1;
    padding: 8px 10px;
    margin: 0;
  }
  .library-views {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
  }
  .library-views .nav-all {
    flex: 1;
    width: auto;
    margin: 0;
  }
  #categories {
    display: inline;
  }
  .category {
    display: inline-flex;
    width: auto;
    font-size: 11px;
    min-height: 34px;
    padding: 7px 9px;
  }
  .category span {
    display: none;
  }
  main {
    padding: 28px 18px 100px;
  }
  h1 {
    font-size: 29px;
  }
  .toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 24px;
  }
  .toolbar .search {
    grid-column: 1 / -1;
    min-width: 0;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .card-body {
    padding: 11px;
  }
  .card-title {
    font-size: 12px;
  }
  .selection-bar {
    bottom: 14px;
    gap: 10px;
    padding: 10px;
    font-size: 11px;
  }
  .selection-bar strong {
    font-size: 11px;
  }
  .selection-bar .text-button {
    font-size: 10px;
  }
  .selection-bar .primary {
    padding: 9px 11px;
    font-size: 11px;
  }
  .local-badge {
    font-size: 10px;
    padding: 6px 8px;
  }
  .sync-bar span {
    max-width: none;
  }
  .dialog-actions > * {
    flex: 1;
  }
  .card-meta {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
