﻿:root {
  --bg: #eef2f4;
  --surface: #ffffff;
  --line: #e2e6ea;
  --text: #333333;
  --muted: #6a737c;
  --accent: #2fc6f6;
  --accent-dark: #1aa8d6;
  --folder: #f5c518;
  --task: #a8b0b8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
}

body {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  line-height: 1.4;
}

.top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-text { flex: 1; min-width: 0; }

.top-mark {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #4fd4f8, var(--accent-dark));
}

.kicker {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #e9f8fd;
  color: #1488ad;
  font-weight: 600;
  font-size: 12px;
}

.id {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

h1 {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.views {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
  padding-top: 4px;
}

.view-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.view-btn:hover { background: #f7fafc; }

.view-btn.active {
  background: #e9f8fd;
  border-color: var(--accent);
  color: #1488ad;
  font-weight: 650;
}

.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.crumbs {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.crumb {
  appearance: none;
  border: 0;
  background: none;
  color: #1a6f8c;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.crumb:hover { text-decoration: underline; }
.crumb.current { color: var(--text); font-weight: 650; cursor: default; }
.crumb-sep { color: #c0c6cc; }

main {
  flex: 1;
  overflow: auto;
  padding: 14px 16px 8px;
}

.pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.pane.tree { padding: 6px 0; }

.empty-pane {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  padding: 14px;
}

.tile {
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: none;
  border-radius: 8px;
  padding: 10px 8px 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font: inherit;
  text-align: center;
}

.tile:hover {
  background: #f7fafc;
  border-color: var(--line);
}

.tile-ico {
  width: 72px;
  height: 56px;
  display: grid;
  place-items: center;
  color: var(--folder);
}

.tile-ico .thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  background: #eef2f4;
}

.ext.big {
  min-width: 44px;
  height: 22px;
  font-size: 11px;
}

.tile-name {
  width: 100%;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tile-meta {
  font-size: 11px;
  color: var(--muted);
}

.grid-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.grid-table th {
  text-align: left;
  font-weight: 650;
  color: var(--muted);
  font-size: 11px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.grid-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f3f5;
  vertical-align: middle;
}

.grid-table tr:hover td { background: #f7fafc; }
.grid-table tr.folder-row { cursor: pointer; }
.grid-table td .ico { display: inline-grid; vertical-align: middle; margin-right: 6px; }

.node-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
}

.node-row.toggle {
  cursor: pointer;
  user-select: none;
}

.node-row.toggle:hover {
  background: #f7fafc;
}

.node-row.root {
  font-weight: 650;
}

.node.collapsed > .children,
.node.collapsed > .files,
.node.collapsed > .task-sub {
  display: none;
}

.children {
  margin: 0 0 4px 22px;
  padding-left: 12px;
  border-left: 1px solid #edf0f2;
}

.chevron, .ico {
  flex: 0 0 auto;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.ico.folder { color: var(--folder); }
.ico.file { color: #7aa0b8; }
.ico.task { color: var(--task); }

.name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.count {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #f0f3f5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.count.empty { background: transparent; color: #c0c6cc; }

button.add {
  appearance: none;
  border: 0;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

button.add:hover { background: var(--accent-dark); }
button.add:active { transform: translateY(1px); }

.files {
  margin: 0 0 6px;
  padding: 0;
  list-style: none;
}

.files li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px 0 28px;
  color: #3f4a54;
}

.files li.empty {
  color: #b0b7be;
  font-style: italic;
}

.file-link {
  color: #1a6f8c;
  text-decoration: none;
}

.file-link:hover {
  text-decoration: underline;
}

.dl {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.dl:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.ext {
  flex: 0 0 auto;
  min-width: 34px;
  height: 16px;
  border-radius: 3px;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: grid;
  place-items: center;
  text-transform: uppercase;
}

.ext.pdf { background: #e24b4a; }
.ext.jpg, .ext.jpeg, .ext.png, .ext.webp, .ext.gif { background: #3db39e; }
.ext.doc, .ext.docx { background: #2b7de9; }
.ext.xls, .ext.xlsx { background: #21a366; }
.ext.file { background: #8a96a3; }

.node.task .node-row {
  opacity: 0.78;
}

.task-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px 6px 28px;
  color: var(--muted);
  font-size: 12px;
}

footer {
  padding: 8px 18px 12px;
  color: var(--muted);
  font-size: 11px;
}
