:root {
  --ink: #17201b;
  --ink-soft: #506058;
  --muted: #7f8a83;
  --canvas: #f5f7f4;
  --surface: #fff;
  --surface-soft: #f7f9f7;
  --line: #e1e6e2;
  --line-strong: #cbd4cd;
  --accent: #176b4d;
  --accent-dark: #0e5239;
  --accent-soft: #e5f3ec;
  --danger: #b64343;
  --danger-soft: #fff1f0;
  --layout-width: 920px;
  --shadow: 0 20px 56px rgba(30, 48, 37, 0.08);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 50% -160px, rgba(23, 107, 77, 0.09), transparent 460px), var(--canvas);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[v-cloak] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--layout-width), calc(100% - 40px));
  min-height: 88px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(203, 212, 205, 0.7);
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 11px;
  font-family: Consolas, monospace;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(23, 107, 77, 0.2);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; line-height: 1.25; }
.brand small { margin-top: 2px; color: var(--muted); font: 12px Consolas, monospace; letter-spacing: .15em; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  color: #37604d;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}
.status-dot { width: 7px; height: 7px; background: #2c9668; border-radius: 50%; box-shadow: 0 0 0 3px rgba(44,150,104,.12); }
.system-status.offline { color: var(--danger); }
.system-status.offline .status-dot { background: var(--danger); box-shadow: 0 0 0 3px rgba(182,67,67,.12); }

.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 8px;
  padding: 0 17px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: 160ms ease;
}
.primary-button { color: #fff; background: var(--accent); border: 1px solid var(--accent); box-shadow: 0 8px 18px rgba(23,107,77,.16); }
.primary-button:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { color: #a0aaa4; background: #e8ece9; border-color: #e8ece9; cursor: not-allowed; box-shadow: none; }
.primary-button svg, .secondary-button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.menu-trigger .chevron { width: 12px; transition: transform 160ms ease; }
.menu-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.secondary-button { color: var(--ink-soft); background: #fff; border: 1px solid var(--line-strong); }
.secondary-button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.secondary-button:disabled { opacity: .5; cursor: not-allowed; }

.page-shell { width: min(var(--layout-width), calc(100% - 40px)); margin: 0 auto; padding: 28px 0 76px; }

.upload-menu { position: relative; display: inline-flex; }
.upload-dropdown {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  width: 270px;
  padding: 6px;
  background: rgba(255,255,255,.98);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 46px rgba(25,42,31,.18);
  animation: menuEnter 140ms ease both;
  backdrop-filter: blur(10px);
}
.upload-dropdown.align-right { right: 0; }
.upload-dropdown.centered { left: 50%; transform: translateX(-50%); }
.upload-dropdown > button {
  display: grid;
  width: 100%;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  padding: 9px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.upload-dropdown > button:hover, .upload-dropdown > button:focus-visible { background: var(--surface-soft); }
.menu-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 9px; }
.menu-icon.image { color: var(--accent); background: var(--accent-soft); }
.menu-icon.video { color: #52665b; background: #edf1ee; }
.menu-icon svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.upload-dropdown strong, .upload-dropdown small { display: block; }
.upload-dropdown strong { font-size: 12px; }
.upload-dropdown small { margin-top: 3px; color: var(--muted); font-size: 12px; }

.library-panel, .history-card { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.library-panel { min-height: 430px; overflow: hidden; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.breadcrumb-wrap { display: flex; align-items: center; min-width: 0; gap: 7px; }
.breadcrumbs { display: flex; align-items: center; min-width: 0; gap: 7px; color: #9aa39d; overflow: hidden; }
.breadcrumbs button { max-width: 130px; padding: 3px 0; overflow: hidden; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs button:hover, .breadcrumbs button.current { color: var(--ink); }
.breadcrumbs button.current { cursor: default; font-weight: 700; }
.toolbar-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.icon-button { display: grid; flex: 0 0 auto; width: 36px; height: 36px; padding: 0; place-items: center; color: var(--ink-soft); background: #fff; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.icon-button:hover:not(:disabled) { color: var(--accent); border-color: #b6c9bd; background: var(--accent-soft); }
.icon-button:disabled { opacity: .5; cursor: wait; }
.icon-button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.search-field { display: flex; align-items: center; width: 168px; height: 36px; gap: 7px; padding: 0 10px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; }
.search-field:focus-within { border-color: rgba(23,107,77,.55); box-shadow: 0 0 0 3px rgba(23,107,77,.08); }
.search-field svg { flex: 0 0 auto; width: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.7; }
.search-field input { width: 100%; min-width: 0; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 12px; }
.search-field input::placeholder { color: #9ba49e; }
.toolbar-upload { min-height: 36px; padding: 0 13px; }
.create-directory-button { min-height: 36px; padding: 0 12px; }

.access-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 16px 18px 0; padding: 13px 14px; background: #f5f8f6; border: 1px solid var(--line); border-radius: 11px; }
.access-bar strong, .access-bar span { display: block; }
.access-bar strong { font-size: 12px; }
.access-bar span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.access-input { display: flex; width: min(320px, 55%); gap: 7px; }
.access-input .ant-input-affix-wrapper { min-height: 36px; border-color: var(--line-strong); border-radius: 8px; }
.access-input button { padding: 0 13px; color: #fff; background: var(--accent); border: 0; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; }

.resource-section { padding: 20px 18px 4px; }
.resource-section + .resource-section { padding-top: 25px; }
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-title h2 { margin: 0; font-size: 12px; }
.section-title span { color: var(--muted); font: 12px Consolas, monospace; }
.folder-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.folder-card { display: grid; grid-template-columns: minmax(0,1fr) 32px; align-items: center; min-width: 0; padding: 5px; color: var(--ink); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; transition: 160ms ease; }
.folder-card:hover { background: #f2f8f5; border-color: #b9d0c2; transform: translateY(-1px); }
.folder-main { display: grid; grid-template-columns: 38px minmax(0,1fr); align-items: center; gap: 10px; min-width: 0; padding: 6px; color: var(--ink); text-align: left; background: transparent; border: 0; cursor: pointer; }
.folder-icon { display: grid; width: 38px; height: 38px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 9px; }
.folder-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.folder-main > span:nth-child(2) { min-width: 0; }
.folder-card strong, .folder-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-card strong { font-size: 12px; }
.folder-card small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.folder-delete { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: #9ba39e; background: transparent; border: 0; border-radius: 8px; cursor: pointer; opacity: 0; transition: 160ms ease; }
.folder-card:hover .folder-delete, .folder-delete:focus-visible { opacity: 1; }
.folder-delete:hover { color: var(--danger); background: var(--danger-soft); }
.folder-delete svg { width: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

.file-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; padding-bottom: 18px; }
.file-card { min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: 160ms ease; }
.file-card:hover { border-color: #bccac1; box-shadow: 0 9px 24px rgba(32,50,39,.09); transform: translateY(-2px); }
.file-preview { position: relative; display: grid; height: 162px; overflow: hidden; place-items: center; color: #8e9992; background: linear-gradient(135deg, #edf1ee, #f7f9f7); text-decoration: none; }
.file-preview::after { position: absolute; inset: 0; content: ""; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02); pointer-events: none; }
.file-preview img { position: absolute; inset: 0; width: 100%; height: 100%; background: #edf1ee; object-fit: cover; transition: transform 220ms ease; }
.file-card:hover .file-preview img { transform: scale(1.025); }
.file-fallback { font: 700 12px Consolas, monospace; }
.video-file-icon { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; color: #607068; }
.video-file-icon::before { position: absolute; z-index: -1; width: 72px; height: 72px; content: ""; background: #e5ebe7; border-radius: 24px; transform: rotate(7deg); }
.video-file-icon svg { width: 34px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.video-file-icon small { font: 700 12px Consolas, monospace; letter-spacing: .12em; }
.file-type { position: absolute; right: 8px; bottom: 8px; z-index: 1; padding: 4px 6px; color: #fff; background: rgba(20,31,24,.72); border-radius: 5px; font: 700 12px Consolas, monospace; backdrop-filter: blur(6px); }
.file-info { display: grid; grid-template-columns: minmax(0,1fr) 66px; align-items: center; gap: 8px; padding: 11px 11px 12px; }
.file-info > div { min-width: 0; }
.file-info strong, .file-info span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info strong { font-size: 12px; }
.file-info span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.file-info button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.file-info button:hover { color: var(--accent); background: var(--accent-soft); border-color: #c3d9cc; }
.file-info button svg { width: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.file-actions { display: flex; min-width: auto !important; gap: 5px; }
.file-info .delete-file-button { color: #9b817f; }
.file-info .delete-file-button:hover { color: var(--danger); background: var(--danger-soft); border-color: #efc9c5; }

.resource-table-wrap { padding: 15px 18px 20px; }
.table-summary { display: flex; align-items: baseline; gap: 10px; padding: 2px 1px 13px; }
.table-summary h2 { margin: 0; font-size: 15px; font-weight: 700; }
.table-summary span { color: var(--muted); font: 12px/1.4 Consolas, monospace; }
.resource-table { width: 100%; border-spacing: 0; border-collapse: separate; table-layout: fixed; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.resource-table th { height: 42px; padding: 0 14px; color: var(--muted); text-align: left; background: #f7f9f7; border-bottom: 1px solid var(--line); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.resource-table td { height: 68px; padding: 9px 14px; color: var(--ink-soft); border-bottom: 1px solid #edf0ed; font-size: 13px; vertical-align: middle; }
.resource-table tbody tr:last-child td { border-bottom: 0; }
.resource-table tbody tr { background: #fff; transition: background-color 140ms ease; }
.resource-table tbody tr:hover { background: #f8faf8; }
.resource-table tbody tr.directory-row { background: #fcfdfc; }
.resource-table tbody tr.directory-row:hover { background: #f3f8f5; }
.resource-table th:first-child, .resource-table td:first-child { width: 46%; }
.resource-table .col-type { width: 11%; }
.resource-table .col-size { width: 10%; white-space: nowrap; }
.resource-table .col-modified { width: 20%; white-space: nowrap; }
.resource-table .col-actions { width: 82px; padding-left: 6px; padding-right: 9px; text-align: right; }
.table-name { display: grid; width: 100%; grid-template-columns: 46px minmax(0,1fr); align-items: center; gap: 12px; min-width: 0; padding: 0; color: var(--ink); text-align: left; text-decoration: none; background: transparent; border: 0; cursor: pointer; }
.table-name > span:last-child { min-width: 0; }
.table-name strong, .table-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-name strong { font-size: 14px; font-weight: 700; }
.table-name small { margin-top: 4px; color: var(--muted); font: 12px/1.35 Consolas, monospace; }
.table-name:hover strong { color: var(--accent); }
.table-thumbnail { position: relative; display: grid; width: 46px; height: 46px; overflow: hidden; place-items: center; border-radius: 10px; }
.table-thumbnail.folder { color: var(--accent); background: var(--accent-soft); }
.table-thumbnail.folder svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.table-thumbnail.file { color: #67746c; background: #edf1ee; font: 700 12px Consolas, monospace; }
.table-thumbnail.file img { position: absolute; inset: 0; width: 100%; height: 100%; background: #edf1ee; object-fit: cover; }
.table-thumbnail.file svg { position: absolute; width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.table-thumbnail.file > span:has(+ svg) { display: none; }
.type-label { display: inline-flex; max-width: 100%; padding: 5px 8px; overflow: hidden; color: #536159; background: #edf1ee; border-radius: 6px; font: 700 12px/1.2 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.type-label.folder { color: var(--accent); background: var(--accent-soft); font-family: inherit; }
.table-actions { display: flex; justify-content: flex-end; gap: 5px; }
.table-actions button { display: grid; width: 29px; height: 29px; padding: 0; place-items: center; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: 140ms ease; }
.table-actions button:hover { color: var(--accent); background: var(--accent-soft); border-color: #c3d9cc; }
.table-actions button.danger { color: #9b817f; }
.table-actions button.danger:hover { color: var(--danger); background: var(--danger-soft); border-color: #efc9c5; }
.table-actions svg { width: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.library-loading, .empty-library { display: flex; min-height: 340px; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.library-loading { flex-direction: row; gap: 10px; font-size: 12px; }
.loading-ring { width: 18px; height: 18px; border: 2px solid #d9e0db; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.empty-icon { display: grid; width: 52px; height: 52px; margin-bottom: 15px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 15px; }
.empty-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.empty-library h2 { margin: 0; color: var(--ink); font-size: 14px; }
.empty-library p { margin: 7px 0 16px; font-size: 12px; }
.library-message { display: flex; align-items: center; gap: 11px; margin: 18px; padding: 14px; border-radius: 10px; }
.library-message.error { color: var(--danger); background: var(--danger-soft); border: 1px solid #f0cfcc; }
.library-message > span { display: grid; flex: 0 0 auto; width: 24px; height: 24px; place-items: center; background: #f6d9d6; border-radius: 50%; font-weight: 800; }
.library-message div { flex: 1; }
.library-message strong, .library-message p { display: block; margin: 0; }
.library-message strong { font-size: 12px; }
.library-message p { margin-top: 3px; color: #8e5652; font-size: 12px; }
.library-message button { color: var(--danger); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.load-more { display: block; min-width: 130px; min-height: 38px; margin: 10px auto 20px; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; }

.history-card { margin-top: 18px; padding: 19px; }
.history-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 7px; }
.history-header h2 { margin: 0; font-size: 14px; }
.history-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.history-header > button, .history-actions button, .text-button, .queue-actions button { padding: 0; color: var(--accent); background: transparent; border: 0; cursor: pointer; font-size: 12px; font-weight: 700; }
.history-header > button:hover, .history-actions button:hover, .text-button:hover, .queue-actions button:hover { color: var(--accent-dark); }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-list li { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; min-width: 0; padding: 11px 0; border-bottom: 1px solid #edf0ed; }
.history-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.history-thumb, .queue-thumb { position: relative; display: grid; overflow: hidden; place-items: center; color: var(--ink-soft); background: #edf1ee; border-radius: 9px; font: 700 12px Consolas, monospace; }
.history-thumb { width: 42px; height: 42px; }
.history-thumb img, .queue-thumb img, .queue-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; background: #edf1ee; object-fit: cover; }
.history-file { min-width: 0; }
.history-file strong, .history-file span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-file strong { font-size: 12px; }
.history-file span { margin-top: 4px; color: var(--muted); font: 12px Consolas, monospace; }
.history-actions { display: flex; gap: 13px; }
.history-actions button.danger { color: var(--danger); }

body > #app > footer { display: flex; justify-content: space-between; width: min(var(--layout-width), calc(100% - 40px)); margin: 0 auto; padding: 21px 0; color: #969f99; border-top: 1px solid var(--line); font-size: 12px; }

.operation-toast { position: fixed; z-index: 1200; right: 24px; bottom: 24px; display: flex; align-items: center; max-width: min(380px, calc(100% - 48px)); gap: 9px; padding: 12px 15px; color: #fff; background: #193d2f; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; box-shadow: 0 14px 40px rgba(18,45,34,.24); font-size: 12px; animation: toastEnter 180ms ease both; }
.operation-toast span { display: grid; width: 20px; height: 20px; place-items: center; color: var(--accent-dark); background: #a9f078; border-radius: 50%; font-size: 12px; font-weight: 900; }

.modal-layer { position: fixed; z-index: 1000; inset: 0; display: grid; padding: 24px; place-items: center; background: rgba(18,27,22,.48); backdrop-filter: blur(5px); animation: fade .16s ease both; }
.management-dialog { width: min(430px, 100%); overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.8); border-radius: 17px; box-shadow: 0 30px 90px rgba(10,24,16,.28); animation: modalEnter .2s ease both; }
.management-header { display: flex; align-items: flex-start; gap: 13px; padding: 21px 21px 17px; border-bottom: 1px solid var(--line); }
.management-header > div { min-width: 0; }
.management-header > div > span { color: var(--accent); font: 700 12px Consolas, monospace; letter-spacing: .13em; }
.management-header h2 { margin: 5px 0 0; font-size: 18px; letter-spacing: -.02em; }
.management-header p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.management-icon { display: grid; flex: 0 0 auto; width: 40px; height: 40px; place-items: center; border-radius: 11px; }
.management-icon.folder { color: var(--accent); background: var(--accent-soft); }
.management-icon.danger { color: var(--danger); background: var(--danger-soft); }
.management-icon svg { width: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.management-body { padding: 18px 21px 20px; }
.management-body > label { display: block; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.management-body .ant-input { min-height: 40px; border-color: var(--line-strong); border-radius: 9px; font-size: 12px; }
.management-body .ant-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(23,107,77,.09); }
.field-hint { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.management-error { margin: 11px 0 0; padding: 9px 10px; color: var(--danger); background: var(--danger-soft); border: 1px solid #f0d1ce; border-radius: 8px; font-size: 12px; }
.management-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 21px; background: #fafbfa; border-top: 1px solid var(--line); }
.delete-target-name { min-width: 0; margin-bottom: 12px; padding: 10px 11px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; }
.delete-target-name span, .delete-target-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.delete-target-name span { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.delete-target-name strong { font-size: 12px; }
.danger-notice { margin-bottom: 14px; padding: 11px; color: #834b47; background: var(--danger-soft); border: 1px solid #efcfcc; border-radius: 9px; }
.danger-notice strong { display: block; font-size: 12px; }
.danger-notice p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; }
.danger-button { min-height: 42px; padding: 0 17px; color: #fff; background: var(--danger); border: 1px solid var(--danger); border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.danger-button:hover:not(:disabled) { background: #993534; border-color: #993534; }
.danger-button:disabled { color: #ad9b99; background: #eee8e7; border-color: #eee8e7; cursor: not-allowed; }
.danger-dialog .management-header > div > span { color: var(--danger); }
.upload-modal { display: flex; width: min(720px, 100%); max-height: calc(100vh - 48px); flex-direction: column; overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.8); border-radius: 18px; box-shadow: 0 30px 90px rgba(10,24,16,.28); animation: modalEnter .22s ease both; }
.modal-header { display: flex; flex: 0 0 auto; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.modal-kicker { color: var(--accent); font: 700 12px Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.modal-header h2 { margin: 7px 0 0; font-size: 21px; letter-spacing: -.02em; }
.modal-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.modal-close { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; color: var(--ink-soft); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.modal-close:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); }
.modal-close:disabled { opacity: .45; cursor: not-allowed; }
.modal-close svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 1.8; }
.modal-body { flex: 1 1 auto; min-height: 0; padding: 18px 24px 22px; overflow-y: auto; scrollbar-color: #cbd2cc transparent; scrollbar-width: thin; }
.modal-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 24px; background: #fafbfa; border-top: 1px solid var(--line); }
.modal-footer > span { max-width: 45%; overflow: hidden; color: var(--muted); font: 12px Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.modal-footer > div { display: flex; gap: 8px; }

.upload-settings { margin-bottom: 14px; padding: 13px 15px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 12px; }
.settings-heading { display: flex; justify-content: space-between; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.settings-heading strong, .settings-heading div span { display: block; }
.settings-heading strong { font-size: 12px; }
.settings-heading div span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.settings-heading > span { color: #a3aca6; font: 12px Consolas, monospace; letter-spacing: .12em; }
.setting-row { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row.disabled { opacity: .55; }
.setting-row strong, .setting-row > div span { display: block; }
.setting-row strong { font-size: 12px; }
.setting-row > div span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.toggle-switch { position: relative; flex: 0 0 auto; width: 36px; height: 21px; padding: 0; background: #c8cfca; border: 0; border-radius: 999px; cursor: pointer; transition: 160ms ease; }
.toggle-switch span { position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(24,34,28,.22); transition: 160ms ease; }
.toggle-switch[aria-checked="true"] { background: var(--accent); }
.toggle-switch[aria-checked="true"] span { transform: translateX(15px); }
.toggle-switch:disabled { cursor: not-allowed; }

.drop-zone.ant-upload-wrapper { display: block; width: 100%; }
.drop-zone.ant-upload-wrapper .ant-upload-drag { width: 100%; min-height: 180px; overflow: hidden; background: var(--surface-soft); border: 1px dashed #bbc5bd; border-radius: 12px; transition: 160ms ease; }
.drop-zone.ant-upload-wrapper .ant-upload-drag:not(.ant-upload-disabled):hover { background: #f3faf6; border-color: var(--accent); }
.drop-zone.has-files.ant-upload-wrapper .ant-upload-drag { min-height: 0; border-style: solid; }
.drop-zone .ant-upload-btn { width: 100%; padding: 15px !important; }
.empty-drop { display: flex; min-height: 148px; flex-direction: column; align-items: center; justify-content: center; }
.upload-icon { display: grid; width: 45px; height: 45px; margin-bottom: 12px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 13px; }
.upload-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.empty-drop strong { margin-bottom: 5px; font-size: 12px; }
.empty-drop > span:last-child { color: var(--muted); font-size: 12px; }
.empty-drop.compact { min-height: 58px; flex-direction: row; gap: 11px; }
.empty-drop.compact .upload-icon { width: 36px; height: 36px; margin: 0; border-radius: 10px; }
.empty-drop.compact .upload-icon svg { width: 18px; }
.empty-drop.compact strong { margin: 0; }
.batch-overview { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 15px 1px 6px; color: var(--muted); font-size: 12px; }
.batch-overview div { display: flex; align-items: baseline; gap: 8px; }
.batch-overview strong { color: var(--ink); font-size: 12px; }
.file-queue { max-height: 380px; margin: 0; padding: 0 4px 0 0; overflow-y: auto; list-style: none; }
.queue-item { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; align-items: center; gap: 11px; min-width: 0; padding: 10px 1px; border-bottom: 1px solid #edf0ed; }
.queue-item:last-child { border-bottom: 0; }
.queue-thumb { width: 46px; height: 46px; }
.queue-content { min-width: 0; }
.queue-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.queue-title strong { min-width: 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.queue-status { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.is-uploading .queue-status, .is-processing .queue-status, .is-success .queue-status { color: var(--accent); }
.is-error .queue-status { color: var(--danger); }
.queue-meta, .queue-optimization { display: block; margin-top: 3px; color: var(--muted); font: 12px Consolas, monospace; }
.queue-optimization { color: var(--accent); font-family: inherit; }
.item-progress { width: 100%; height: 3px; margin-top: 6px; overflow: hidden; background: #e4e8e4; border-radius: 999px; }
.item-progress span { display: block; height: 100%; background: var(--accent); transition: width 160ms ease; }
.queue-error, .queue-url { margin: 4px 0 0; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.queue-error { color: var(--danger); }
.queue-url { color: var(--muted); font-family: Consolas, monospace; }
.queue-actions button:disabled, .text-button:disabled { cursor: not-allowed; opacity: .4; }
.token-field, .progress-block { margin-top: 15px; }
.token-field label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.token-field .ant-input-affix-wrapper { min-height: 40px; border-color: var(--line-strong); border-radius: 9px; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 5px; color: var(--ink-soft); font-size: 12px; }
.result-card { margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.result-summary, .error-result { display: flex; align-items: flex-start; gap: 10px; }
.result-icon { display: grid; flex: 0 0 auto; width: 23px; height: 23px; place-items: center; color: var(--accent); background: var(--accent-soft); border-radius: 50%; font-size: 12px; font-weight: 800; }
.result-icon.partial { color: #9b681a; background: #fff0d2; }
.result-card strong { display: block; font-size: 12px; }
.result-card p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.error-result { color: var(--danger); background: var(--danger-soft); border-color: #f2ceca; }
.error-result .result-icon { color: var(--danger); background: #f7dcd8; }
.copy-all-button { width: 100%; min-height: 36px; margin-top: 11px; color: var(--accent); background: var(--accent-soft); border: 0; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; }

button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(23,107,77,.22); outline-offset: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalEnter { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes menuEnter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.upload-dropdown.centered { animation-name: menuEnterCentered; }
@keyframes menuEnterCentered { from { opacity: 0; transform: translate(-50%, -4px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toastEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .site-header, .page-shell, body > #app > footer { width: calc(100% - 28px); }
  .page-shell { padding-top: 22px; }
  .library-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .search-field { flex: 1; width: auto; }
  .folder-grid, .file-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .resource-table th:first-child, .resource-table td:first-child { width: auto; }
  .resource-table .col-modified { display: none; }
  .resource-table .col-type { width: 74px; }
  .resource-table .col-size { width: 72px; }
  .access-bar { align-items: stretch; flex-direction: column; }
  .access-input { width: 100%; }
  .modal-layer { padding: 12px; }
  .upload-modal { max-height: calc(100vh - 24px); }
}

@media (max-width: 520px) {
  .system-status { display: none; }
  .toolbar-upload { font-size: 0; }
  .toolbar-upload svg { margin: 0; }
  .create-directory-button { width: 36px; padding: 0; font-size: 0; }
  .folder-delete { opacity: 1; }
  .folder-grid { grid-template-columns: 1fr; }
  .file-grid { gap: 8px; }
  .file-preview { height: 125px; }
  .file-info { grid-template-columns: minmax(0,1fr) 62px; padding: 9px; }
  .resource-table-wrap { padding: 12px 10px 16px; }
  .resource-table th, .resource-table td { padding-left: 9px; padding-right: 9px; }
  .resource-table .col-type { display: none; }
  .resource-table .col-size { width: 62px; }
  .resource-table .col-actions { width: 72px; padding-left: 2px; padding-right: 6px; }
  .table-name { grid-template-columns: 36px minmax(0,1fr); gap: 8px; }
  .table-thumbnail { width: 36px; height: 36px; }
  .table-name small { display: none; }
  .history-list li { grid-template-columns: 38px minmax(0,1fr); }
  .history-thumb { width: 38px; height: 38px; }
  .history-actions { grid-column: 2; }
  .modal-header, .modal-body { padding-left: 17px; padding-right: 17px; }
  .modal-footer { align-items: stretch; flex-direction: column; padding: 12px 17px; }
  .modal-footer > span { max-width: 100%; }
  .modal-footer > div { display: grid; grid-template-columns: 1fr 1.7fr; }
  .setting-row > div span, .settings-heading div span { max-width: 210px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
