:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #748096;
  --line: #e4e8ef;
  --accent: #2868e8;
  --accent-soft: #edf3ff;
  --sidebar: #f8f9fc;
  --shadow: 0 18px 50px rgba(29, 45, 78, 0.08);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #3878ef, #1f55c9); box-shadow: 0 7px 18px rgba(40, 104, 232, .25); }
.brand-mark svg { width: 21px; fill: #fff; }
.brand-tag { padding: 3px 7px; border-radius: 6px; color: #5e6d83; background: #eef1f6; font-size: 11px; font-weight: 650; letter-spacing: .02em; }
.search { display: flex; align-items: center; gap: 10px; width: min(500px, 46vw); margin-left: 8px; padding: 9px 13px; background: #f6f7fa; border: 1px solid transparent; border-radius: 10px; }
.search:focus-within { border-color: #b9cdf8; background: #fff; box-shadow: 0 0 0 3px #edf3ff; }
.search svg { width: 18px; fill: none; stroke: #73819a; stroke-width: 1.8; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.profile { display: flex; align-items: center; gap: 9px; margin-left: auto; border: 0; background: transparent; color: #536076; cursor: pointer; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e5edff; color: #245bd1; font-size: 12px; font-weight: 800; }

.shell { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: calc(100vh - 68px); }
.sidebar { padding: 28px 18px; background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar nav { display: grid; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 13px; border-radius: 9px; color: #58657a; font-weight: 600; }
.nav-item:hover { background: #eef1f6; color: var(--ink); }
.nav-item.active { color: #205bd7; background: var(--accent-soft); }
.nav-icon { width: 20px; color: inherit; text-align: center; font-size: 17px; }
.storage { margin-top: 34px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.storage-head { display: flex; justify-content: space-between; font-size: 13px; }
.storage-head strong { color: var(--accent); }
.meter { height: 6px; margin: 12px 0 9px; overflow: hidden; border-radius: 999px; background: #e7ebf2; }
.meter span { display: block; width: 32%; height: 100%; background: var(--accent); }
.storage p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.storage a { color: var(--accent); font-size: 12px; font-weight: 650; }

main { min-width: 0; padding: 32px 42px 52px; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.crumbs strong { color: #4c596d; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 28px 0 26px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.15; letter-spacing: -.035em; }
.muted { margin: 9px 0 0; color: var(--muted); }
.actions { display: flex; gap: 10px; }
.actions button { padding: 10px 16px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: #4f5d72; font-weight: 650; cursor: pointer; }
.actions button.primary { color: #fff; border-color: var(--accent); background: var(--accent); }
.actions button:hover { transform: translateY(-1px); }
.toolbar { display: flex; align-items: center; justify-content: space-between; padding: 15px 0 12px; border-bottom: 1px solid var(--line); }
.toolbar-title { display: flex; align-items: center; gap: 10px; }
.count { color: var(--muted); font-size: 12px; }
.view-switch { display: flex; padding: 3px; border-radius: 8px; background: #e9edf3; }
.view-switch button { width: 31px; height: 27px; border: 0; border-radius: 6px; background: transparent; color: #768298; cursor: pointer; }
.view-switch button.selected { background: #fff; color: #31506f; box-shadow: 0 1px 4px rgba(27, 40, 66, .12); }

.file-list { overflow: hidden; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.file-row { display: grid; grid-template-columns: 36px minmax(180px, 1fr) 130px 125px 90px 42px; align-items: center; gap: 12px; min-height: 61px; padding: 0 18px; border-bottom: 1px solid #eef1f5; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #fafbfd; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 620; }
.file-row.folder .file-name { color: #253b61; }
.file-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: #7b879a; background: #eef1f5; font-size: 10px; font-weight: 800; }
.folder .file-icon { color: #d49b21; background: #fff3d6; font-size: 15px; }
.pdf { color: #c44c4c; background: #fdecec; }
.doc { color: #2f66c9; background: #eaf1ff; }
.zip { color: #8a5ab9; background: #f2ebfb; }
.img { color: #318269; background: #e7f6f0; }
.owner, .modified, .size { color: var(--muted); font-size: 12px; }
.file-row > button { border: 0; background: transparent; color: #8490a3; cursor: pointer; letter-spacing: 1px; }

.notice { display: flex; align-items: center; gap: 10px; margin-top: 20px; color: #67758a; font-size: 12px; }
.notice-icon { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #4267a8; background: #e7efff; font-weight: 700; }
footer { display: flex; gap: 18px; padding: 17px 28px; color: #8c96a6; border-top: 1px solid var(--line); background: #fff; font-size: 11px; }
footer span:last-child { margin-left: auto; color: #65748a; }

@media (max-width: 900px) {
  .topbar { gap: 14px; padding: 0 16px; }
  .brand-tag, .profile-name { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main { padding: 24px 18px 40px; }
  .file-row { grid-template-columns: 36px minmax(130px, 1fr) 100px 34px; }
  .owner, .modified { display: none; }
}

@media (max-width: 560px) {
  .search { display: none; }
  .hero { align-items: start; flex-direction: column; }
  .actions { width: 100%; }
  .actions button { flex: 1; }
  .file-row { grid-template-columns: 32px minmax(0, 1fr) 30px; gap: 10px; padding: 0 12px; }
  .size { display: none; }
}
