/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
@layer theme, base, components, utilities;
@layer theme {
  :root, :host {
    --font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
      "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --spacing: 0.25rem;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
  }
}
@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html, :host {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}
@layer utilities {
  .start {
    inset-inline-start: var(--spacing);
  }
  .contents {
    display: contents;
  }
  .hidden {
    display: none;
  }
  .table {
    display: table;
  }
  .rounded {
    border-radius: 0.25rem;
  }
}
:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-muted: #eef2ed;
  --surface-strong: #233027;
  --border: #d9dfd7;
  --border-strong: #b9c3b7;
  --text: #1d261f;
  --text-muted: #657167;
  --accent: #3f6f58;
  --accent-hover: #345d49;
  --accent-soft: #e3ede6;
  --danger: #9f2f2f;
  --danger-soft: #f6e7e4;
  --focus: #7c9f86;
  --shadow: 0 2px 8px rgba(35, 48, 39, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  min-height: 100%;
  scroll-behavior: smooth;
}
body {
  min-height: 100%;
  margin: 0;
  background: linear-gradient(rgba(35, 48, 39, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(35, 48, 39, 0.025) 1px, transparent 1px), var(--bg);
  background-size: 28px 28px;
  color: var(--text);
  font-family: "Aptos", "SF Pro Text", "Helvetica Neue", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button, input {
  font: inherit;
}
button, a {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}
button {
  cursor: pointer;
}
button:active, a:active {
  transform: translateY(1px);
}
:focus-visible {
  outline: 3px solid rgba(124, 159, 134, 0.35);
  outline-offset: 2px;
}
.hidden {
  display: none !important;
}
.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(246, 247, 244, 0.94);
  backdrop-filter: blur(10px);
}
.nav-inner {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}
.brand-link, .nav-actions, .nav-link, .text-link, .button-primary, .button-secondary, .button-ghost, .button-danger {
  display: inline-flex;
  align-items: center;
}
.brand-link {
  gap: 10px;
  font-weight: 650;
}
.brand-mark {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
}
.brand-text {
  font-size: 16px;
}
.nav-actions {
  gap: 8px;
}
.nav-link {
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 550;
}
.nav-link:hover {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.nav-link-strong {
  border-color: var(--surface-strong);
  background: var(--surface-strong);
  color: #f7faf6;
}
.nav-link-strong:hover {
  border-color: #18221c;
  background: #18221c;
  color: #ffffff;
}
.app-shell {
  display: grid;
  grid-template-columns: minmax(240px, 282px) minmax(0, 1fr);
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 28px 40px;
}
.app-sidebar {
  min-width: 0;
}
.app-content {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}
.sidebar-panel, .content-panel, .form-panel, .modal-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.sidebar-panel {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px;
}
.sidebar-actions {
  display: grid;
  gap: 8px;
}
.folder-panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}
.sidebar-user {
  margin: 0;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.folder-tree {
  display: grid;
  gap: 3px;
}
.tree-node {
  display: grid;
  gap: 3px;
}
.tree-row {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 8px 0 calc(8px + (var(--depth) * 14px));
  border-radius: 7px;
  color: var(--text-muted);
}
.tree-row:hover {
  background: var(--surface-muted);
  color: var(--text);
}
.tree-toggle, .tree-toggle-placeholder {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
}
.tree-toggle {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
}
.tree-toggle:hover {
  background: var(--surface);
  color: var(--text);
}
.tree-toggle .icon {
  width: 15px;
  height: 15px;
}
.tree-link {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 520;
}
.folder-icon {
  color: #8c6f39;
}
.file-icon {
  color: var(--accent);
}
.content-panel {
  min-width: 0;
  overflow: hidden;
}
.content-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
}
.content-header > :first-child {
  min-width: 0;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #4e5a51;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.4;
}
.breadcrumbs a:hover, .text-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.page-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.sort-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.sort-group a {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}
.sort-group a:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
}
.items-list {
  display: grid;
  padding: 8px;
}
.items-header, .item-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 90px 132px 196px;
  align-items: center;
  column-gap: 16px;
}
.items-header {
  min-height: 38px;
  padding: 0 14px;
  color: #516052;
  font-size: 12px;
  font-weight: 750;
}
.item-row {
  min-height: 58px;
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  border-radius: 7px;
}
.items-header + .item-row {
  border-top-color: transparent;
}
.item-row:hover {
  background: #f9faf7;
}
.item-name {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 620;
}
.item-name a {
  color: inherit;
}
.item-name .icon {
  flex: 0 0 auto;
}
.item-name a, .item-name span, .item-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.item-meta {
  color: #536257;
  font-size: 14px;
  font-weight: 540;
  font-variant-numeric: tabular-nums;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.items-list .row-actions {
  display: grid;
  grid-template-columns: 112px 76px;
  justify-content: end;
}
.button-primary, .button-secondary, .button-ghost, .button-danger {
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  font-weight: 650;
  white-space: nowrap;
}
.row-action-main, .row-action-delete {
  width: 100%;
}
.button-primary {
  border: 1px solid var(--accent-hover);
  background: var(--accent);
  color: #ffffff;
}
.button-primary:hover {
  background: var(--accent-hover);
}
.button-secondary, .button-ghost {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.button-secondary:hover, .button-ghost:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}
.button-danger {
  border: 1px solid transparent;
  background: transparent;
  color: var(--danger);
}
.button-danger:hover {
  border-color: #e5c4bd;
  background: var(--danger-soft);
}
.button-full {
  width: 100%;
}
.empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 54px 24px 60px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
}
.empty-state p {
  margin: 0;
  font-weight: 550;
}
.empty-icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
}
.file-detail-panel {
  overflow: hidden;
}
.file-detail-panel .content-header .row-actions {
  flex: 0 0 auto;
}
.file-detail-list {
  display: grid;
  padding: 8px;
}
.file-detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.file-detail-row:first-child {
  border-top-color: transparent;
}
.file-detail-row dt {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}
.file-detail-row dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-weight: 560;
}
.app-main {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 42px 28px;
}
.app-main-narrow {
  width: min(100%, 480px);
}
.app-main-narrow > .error-list {
  width: 100%;
  margin-top: 8px;
  margin-bottom: 18px;
}
.app-main-narrow > .error-list + .form-panel {
  margin-top: 0;
}
.form-panel {
  margin-top: 18px;
  padding: 22px;
}
.form-stack, .field-group, .modal-stack {
  display: grid;
}
.form-stack {
  gap: 16px;
}
.field-group {
  gap: 9px;
}
.field-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}
.text-field {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fbfcfa;
  color: var(--text);
  padding: 9px 11px;
}
.text-field:hover {
  border-color: #9eaa9b;
}
.text-field:focus {
  border-color: var(--focus);
  outline: 3px solid rgba(124, 159, 134, 0.22);
}
input[type="file"].text-field {
  padding: 8px;
}
input[type="file"].text-field::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}
.file-upload-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fbfcfa;
}
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}
.file-picker-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 680;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.file-picker-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}
.file-input:focus-visible + .file-picker-button {
  outline: 3px solid rgba(124, 159, 134, 0.35);
  outline-offset: 2px;
}
.file-upload-name {
  min-width: 0;
  overflow: hidden;
  color: #3f4b42;
  font-size: 14px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}
.form-footer p {
  margin: 0;
}
.text-link {
  gap: 7px;
  color: var(--accent);
  font-weight: 650;
}
.error-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-self: start;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid #e5c4bd;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}
.error-list p {
  margin: 0;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: start center;
  padding: 104px 20px 32px;
  background: rgba(29, 38, 31, 0.5);
}
.modal-panel {
  width: min(100%, 440px);
  padding: 18px;
}
.modal-stack {
  gap: 16px;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-header h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}
.icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
}
.icon-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
  color: var(--text);
}
#delete-message {
  margin: 0;
  color: var(--text-muted);
}
@media (max-width: 860px) {
  .nav-inner {
    padding: 0 16px;
  }
  .brand-text {
    display: none;
  }
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .sidebar-panel {
    position: static;
  }
  .content-header {
    display: grid;
    padding: 18px;
  }
  .sort-group {
    justify-content: flex-start;
  }
  .items-header {
    display: none;
  }
  .item-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
    padding: 14px 12px;
  }
  .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }
  .items-list .row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }
  .file-detail-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 12px;
  }
  .item-meta {
    white-space: nowrap;
  }
  .app-main {
    padding: 28px 16px;
  }
}
@media (max-width: 520px) {
  .nav-link {
    padding: 0 9px;
  }
  .nav-link .icon {
    display: none;
  }
  .sidebar-actions, .row-actions, .form-footer {
    display: grid;
  }
  .row-actions {
    grid-template-columns: none;
  }
  .items-list .row-actions {
    grid-template-columns: 1fr;
  }
  .button-primary, .button-secondary, .button-ghost, .button-danger {
    width: 100%;
  }
}
