:root {
  color-scheme: light dark;
  --canvas: #f5f2fb;
  --paper: #fff;
  --ink: #221837;
  --muted: #625974;
  --line: #e6deef;
  --soft: #efe7fc;
  --accent: #6435cc;
  --accent-hover: #4e24ae;
  --copper: #dbab91;
  --danger: #a1264b;
  --danger-bg: #fcebf0;
  font: 15px/1.5 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #191323;
    --paper: #21192d;
    --ink: #f6efff;
    --muted: #bfb1ce;
    --line: #43344f;
    --soft: #352448;
    --accent: #a781ff;
    --accent-hover: #bd9fff;
    --danger: #ffacc5;
    --danger-bg: #482336;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input { font: inherit; }
button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: inherit; cursor: pointer; font-weight: 630;
}
button:disabled { opacity: .48; cursor: default; }
button:not(:disabled):hover { background: var(--soft); }
button.primary { background: var(--accent); color: light-dark(white, #211735); }
button.primary:not(:disabled):hover { background: var(--accent-hover); }
button.outline { background: var(--paper); border-color: var(--line); }
button.quiet { color: var(--muted); }
input {
  min-width: 0; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--paper); color: var(--ink);
}
button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem,4vw,2.85rem); line-height: 1.07; letter-spacing: -.055em; font-weight: 730; overflow-wrap: anywhere; }
h2 { font-size: 1.28rem; letter-spacing: -.03em; overflow-wrap: anywhere; }
small { font-size: .79rem; }
.skip { position: fixed; z-index: 3; top: 8px; left: 8px; padding: 10px; background: var(--paper); color: var(--ink); transform: translateY(-200%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 1.45rem; line-height: 1.03; font-weight: 740; letter-spacing: -.04em; }
.brand img { flex: 0 0 auto; }
.brand small { display: block; margin-top: 5px; font-weight: 500; letter-spacing: 0; opacity: .78; }
.dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--copper); }
.signin { min-height: 100vh; display: grid; grid-template-columns: minmax(340px, 1fr) 1.02fr; }
.signin-art {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  align-items: start; min-height: 100%; padding: clamp(28px,5vw,76px); background: #261749; color: #fff3ff;
}
.art-center { margin: 62px auto; align-self: center; }
.orbit { position: relative; display: grid; place-items: center; width: clamp(190px,29vw,379px); aspect-ratio: 1; }
.orbit::before, .orbit::after {
  content: ""; position: absolute; inset: 4%; border: 1px solid #c297ea50;
  border-radius: 50%; transform: rotate(-24deg) scale(1.3,.52);
}
.orbit::after { transform: rotate(30deg) scale(1.3,.69); opacity: .58; }
.orbit img { z-index: 1; width: 68%; height: auto; filter: drop-shadow(0 16px 27px #14082c8f); }
.art-footer { display: flex; align-items: center; gap: 9px; color: #e5d4fb; }
.signin-panel { display: grid; place-items: center; background: var(--paper); padding: 42px 25px; }
.signin-inner { width: min(100%, 365px); }
.signin-inner > p { margin: 14px 0 29px; color: var(--muted); }
.signin form, dialog form { display: grid; gap: 9px; }
.signin label, dialog label { margin-top: 8px; font-weight: 620; }
.signin form .primary { margin-top: 12px; min-height: 46px; }
.notice { padding: 11px 14px; border-radius: 7px; color: var(--danger) !important; background: var(--danger-bg); }
.workspace { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 30px; min-height: 100vh; padding: 25px 16px; }
.sidebar .brand { margin-left: 7px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav button { justify-content: start; min-height: 45px; font-size: .98rem; }
.sidebar nav [aria-current] { background: var(--soft); color: var(--accent); }
.sidebar-bottom { display: grid; gap: 8px; margin-top: auto; padding: 0 8px; color: var(--muted); font-size: .86rem; }
.sidebar-bottom label { color: var(--ink); font-weight: 660; }
.sidebar-bottom button { justify-self: start; margin: 8px 0 0 -12px; }
progress { width: 100%; height: 7px; accent-color: var(--accent); }
.main { min-width: 0; padding: 0 26px 26px 0; }
.topbar { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 0 16px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; min-width: 0; color: var(--muted); }
.breadcrumbs button { min-height: 32px; padding: 0 8px; max-width: 38vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.breadcrumbs span { padding: 0 8px; overflow-wrap: anywhere; }
.identity { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .89rem; font-weight: 630; }
.identity span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
#avatar, #account-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 33px; height: 33px; border-radius: 50%; background: var(--soft); color: var(--accent); font-weight: 700; }
.surface { min-height: calc(100vh - 106px); padding: clamp(18px,3vw,44px); border: 1px solid var(--line); border-radius: 17px; background: var(--paper); }
.heading, .toolbar, .transfer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.heading { margin: 3px 0 28px; }
.heading p, .empty p, .account p { margin-top: 7px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar { padding: 0 0 18px; }
.toolbar input { width: min(100%, 255px); background: var(--canvas); }
.privacy { color: var(--muted); font-size: .82rem; display: flex; align-items: center; gap: 7px; }
.transfer, .surface .notice { margin: 0 0 14px; }
.transfer { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.transfer progress { width: min(45%, 200px); }
.empty { border-top: 1px solid var(--line); display: grid; place-items: center; text-align: center; padding: clamp(40px,11vh,116px) 18px; }
.empty img { margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-weight: 620; font-size: .83rem; color: var(--muted); background: var(--canvas); }
th:nth-child(2) { width: 125px; }
th:last-child { width: 105px; text-align: right; }
td:last-child { text-align: right; }
td:nth-child(2) { font-size: .87rem; color: var(--muted); }
td:first-child { padding-left: 2px; }
.row-name { width: 100%; justify-content: flex-start; font-weight: 570; min-width: 0; text-align: left; padding-left: 8px; }
.row-name span:last-child { min-width: 0; overflow-wrap: anywhere; }
.row-plain { display: flex; align-items: center; gap: 8px; padding: 8px; min-height: 40px; overflow-wrap: anywhere; }
.row-menu { position: relative; display: inline-block; text-align: left; }
.row-menu summary { list-style: none; display: grid; place-items: center; min-width: 40px; height: 38px; border-radius: 8px; cursor: pointer; font-weight: 800; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu[open] summary, .row-menu summary:hover { background: var(--soft); }
.row-menu div { position: absolute; z-index: 2; right: 0; min-width: 155px; padding: 5px; display: grid; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: 0 5px 16px #21133226; }
.row-menu button { justify-content: flex-start; white-space: nowrap; }
button.danger { color: var(--danger); }
.account-identity { display: flex; align-items: center; gap: 18px; padding: 18px 0 25px; }
#account-avatar { width: 60px; height: 60px; font-size: 1.6rem; }
.account-identity p, .account dd { overflow-wrap: anywhere; }
.account dl { max-width: 620px; border-top: 1px solid var(--line); margin: 0; }
.account dl div { display: grid; grid-template-columns: minmax(125px,1fr) 1.3fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.account dt { color: var(--muted); }
.account dd { margin: 0; font-weight: 620; }
dialog { width: min(440px,calc(100% - 32px)); padding: 24px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
dialog::backdrop { background: #160c2a88; }
dialog .actions { justify-content: end; margin-top: 14px; }
.icon { display: inline-block; flex: 0 0 auto; position: relative; width: 16px; height: 16px; color: var(--accent); }
.icon.folder::before { content: ""; position: absolute; top: 1px; left: 0; width: 8px; height: 5px; border-radius: 2px; background: currentColor; }
.icon.folder::after { content: ""; position: absolute; inset: 4px 0 1px; border-radius: 2px; background: currentColor; opacity: .85; }
.icon.file::before { content: ""; position: absolute; inset: 0 2px; border: 1.5px solid currentColor; border-radius: 3px; }
.icon.bin::before { content: ""; position: absolute; inset: 4px 3px 0; border: 1.5px solid currentColor; border-radius: 0 0 3px 3px; }
.icon.bin::after { content: ""; position: absolute; inset: 1px 1px auto; height: 1.5px; background: currentColor; }
.icon.person::before { content: ""; position: absolute; inset: 0 4px auto; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; }
.icon.person::after { content: ""; position: absolute; inset: auto 1px 0; height: 7px; border: 1.5px solid currentColor; border-radius: 8px 8px 2px 2px; }
@media (max-width: 720px) {
  .signin { grid-template-columns: 1fr; min-height: 100dvh; grid-template-rows: auto 1fr; }
  .signin-art { padding: 12px 20px; }
  .art-center, .art-footer { display: none; }
  .signin-panel { align-items: start; padding-top: clamp(36px,10vh,90px); }
  .workspace { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; padding: 10px 12px; gap: 8px; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav button { min-height: 36px; padding: 0 10px; }
  .sidebar-bottom { position: absolute; top: 12px; right: 7px; margin: 0; }
  .sidebar-bottom label, .sidebar-bottom progress, .sidebar-bottom span { display: none; }
  .sidebar-bottom button { margin: 0; }
  .main { padding: 0 10px 10px; }
  .topbar { min-height: 46px; padding-left: 3px; }
  .identity span:last-child { display: none; }
  .surface { min-height: calc(100dvh - 180px); }
}
@media (max-width: 480px) {
  th:nth-child(2), td:nth-child(2) { display: none; }
  th:last-child { width: 63px; }
  .privacy { display: none; }
}
