:root {
  color-scheme: light dark;
  --bg: #eef3fb;
  --panel: #fff;
  --ink: #101d36;
  --muted: #495b76;
  --line: #cdd8ea;
  --accent: #244de2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) {
    --bg: #101827; --panel: #19253b; --ink: #eff5ff; --muted: #b7c8e3; --line: #425675;
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --bg: #101827; --panel: #19253b; --ink: #eff5ff; --muted: #b7c8e3; --line: #425675;
}
:root[data-theme=light] { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; background: var(--bg); color: var(--ink); font: 1rem/1.5 system-ui, sans-serif; }
aside { background: #101d36; color: #fff; padding: 1.5rem; }
aside a { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: .75rem; font-size: 1.15rem; font-weight: 750; overflow-wrap: anywhere; }
.brand img { border-radius: 12px; }
nav { display: grid; gap: .4rem; margin-block: 2rem; }
nav a { padding: .6rem .8rem; border-radius: .6rem; }
nav a[aria-current] { background: #25395d; }
aside button { color: white; border-color: #687b9c; background: transparent; margin-bottom: .6rem; }
main { width: min(100%, 1160px); padding: clamp(1rem, 4vw, 3.5rem); min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1rem, 3vw, 1.75rem); margin-block: 1rem; }
.login { max-width: 480px; margin: clamp(1rem, 5vw, 5rem) auto; }
h1, h2 { margin: 0 0 .65rem; line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); letter-spacing: -.035em; }
h2 { font-size: 1.25rem; }
p { color: var(--muted); }
.notice { padding: .75rem 1rem; border-radius: .75rem; background: var(--panel); border: 1px solid var(--line); }
#status:empty { display: none; }
#status { white-space: pre-wrap; color: var(--ink); }
label { display: block; font-weight: 600; margin-block: .7rem; }
input:not([type=checkbox]), select, textarea { display: block; width: 100%; margin-top: .35rem; padding: .7rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--bg); color: var(--ink); font: inherit; }
button { font: inherit; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: .55rem; background: var(--panel); color: var(--ink); cursor: pointer; transition: background .15s, border-color .15s; }
button:hover { border-color: #5578ff; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #6f8cff; outline-offset: 3px; }
button:disabled { opacity: .6; cursor: wait; }
.primary { background: var(--accent); color: white; border-color: var(--accent); margin-top: .45rem; }
.toolbar, #breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; }
.toolbar { justify-content: space-between; }
.files { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: .65rem; }
.files.list { display: block; }
.files.list li { margin-bottom: .35rem; }
.files button, .files span { width: 100%; display: block; text-align: left; min-height: 48px; padding: .7rem; overflow-wrap: anywhere; }
.files span { border: 1px solid var(--line); border-radius: .55rem; color: var(--muted); }
@media (max-width: 720px) {
  body { display: block; }
  aside { padding: .75rem 1rem; }
  nav { display: flex; flex-wrap: wrap; margin-block: .65rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.files a { display: inline-block; margin: .4rem .1rem; color: var(--ink); }

#drop-zone { border: 1px dashed currentColor; padding: 1rem; border-radius: .65rem; }
#destination-dialog { width: min(94vw, 36rem); max-height: 85vh; overflow: auto; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: .8rem; }
#destination-dialog::backdrop { background: #101d3699; }
#destination-breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .65rem; }
#destination-folders { list-style: none; padding: 0; }
#destination-folders button { margin-block: .2rem; }
.files details { padding-block: .45rem; }
.files summary { cursor: pointer; }
.files details a { display: inline-block; margin-inline: .4rem; }
#import-progress, #status { overflow-wrap: anywhere; white-space: pre-line; }
