:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background: #11181d;
  color: #edf3f4;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input { font: inherit; }
button { border: 0; background: #25a99d; color: #06201d; font-weight: 700; padding: 9px 13px; cursor: pointer; border-radius: 5px; }
button:hover { filter: brightness(1.08); }
button:disabled { cursor: not-allowed; opacity: .55; }
button.secondary { background: #27363d; color: #dde8e9; }
button.danger { background: #c7554e; color: #fff; }
button.icon { width: 34px; height: 34px; padding: 0; display: inline-grid; place-items: center; font-size: 18px; }
input { width: 100%; background: #172329; color: #edf4f5; border: 1px solid #3b4d54; border-radius: 5px; padding: 10px 11px; }
input:focus { border-color: #48b9ad; outline: 2px solid #1b4f4a; outline-offset: 1px; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-panel { width: min(420px, 100%); padding: 30px; background: #172329; border: 1px solid #34474e; border-radius: 7px; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: 0; }
h1 { font-size: 20px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.mark { position: relative; width: 29px; height: 23px; border: 2px solid #d7bd63; border-radius: 3px; }
.mark::before { content: ""; position: absolute; width: 11px; height: 7px; background: #25a99d; right: -7px; bottom: -5px; border-radius: 2px; }
.muted { color: #a8b9be; font-size: 14px; line-height: 1.55; }
.error { min-height: 20px; color: #ff9f9a; font-size: 14px; }
form { display: grid; gap: 13px; margin-top: 22px; }
label { display: grid; gap: 6px; color: #cbd7da; font-size: 13px; }

.drive { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); }
.sidebar { background: #142027; border-right: 1px solid #304149; padding: 20px 12px; display: flex; flex-direction: column; min-height: 100vh; }
.sidebar .brand { padding: 2px 9px 23px; }
.nav { display: grid; gap: 4px; }
.nav button { min-height: 39px; text-align: left; border-radius: 4px; background: transparent; color: #aec0c5; font-weight: 600; }
.nav button.active { color: #eff9f8; background: #234047; }
.nav button .nav-icon { width: 26px; display: inline-block; color: #6fd3c9; }
.side-note { margin-top: auto; padding: 15px 10px 3px; border-top: 1px solid #2c3e45; color: #8da1a7; font-size: 12px; line-height: 1.55; }
.main { min-width: 0; background: #11191e; }
.topbar { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid #2e3f46; }
.location-title { font-size: 16px; font-weight: 650; }
.account { display: flex; align-items: center; gap: 12px; }
.user { color: #b6c7cb; font-size: 13px; }
.content { max-width: 1400px; padding: 26px 28px 40px; margin: 0 auto; }
.toolbar { display: flex; align-items: center; gap: 10px; min-height: 40px; margin-bottom: 17px; flex-wrap: wrap; }
.breadcrumbs { min-width: 190px; flex: 1; display: flex; align-items: center; gap: 4px; color: #c1d0d3; font-size: 14px; overflow: auto hidden; white-space: nowrap; }
.crumb { color: #c1d0d3; padding: 5px 4px; background: transparent; font-weight: 500; }
.crumb:hover { color: #77d8cf; }
.crumb.current { cursor: default; color: #eff7f7; }
.slash { color: #71868b; }
.search { position: relative; width: min(270px, 100%); }
.search input { padding-left: 33px; height: 38px; }
.search::before { content: "⌕"; position: absolute; left: 11px; top: 7px; color: #8ca2a8; font-size: 20px; z-index: 1; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px; margin-bottom: 18px; color: #cad6d8; background: #1a292e; border-left: 3px solid #d5bb5d; font-size: 13px; line-height: 1.5; }
.notice strong { color: #efddb1; white-space: nowrap; }
.file-table { border: 1px solid #304149; border-radius: 6px; overflow: hidden; background: #142026; }
.row { display: grid; grid-template-columns: minmax(260px, 1fr) 164px 110px 118px; align-items: center; gap: 12px; min-height: 55px; padding: 8px 15px; border-bottom: 1px solid #293a40; }
.row:last-child { border-bottom: 0; }
.row.heading { min-height: 39px; color: #8fa6ac; background: #18272d; font-size: 12px; }
.row:not(.heading):hover { background: #1a2a30; }
.name { min-width: 0; display: flex; align-items: center; gap: 10px; }
.item-icon { width: 21px; color: #81d9d0; font-size: 18px; text-align: center; flex: 0 0 auto; }
.file .item-icon { color: #b4c5ca; }
.entry { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 4px; background: transparent; color: #ebf1f2; font-weight: 550; }
.directory .entry { color: #88dcd3; }
.meta { color: #a4b6bb; font-size: 13px; }
.actions { display: flex; justify-content: flex-end; gap: 6px; }
.actions .icon { color: #d8e3e4; background: #293b42; }
.empty { padding: 54px 18px; color: #a6b8bd; text-align: center; }
.empty strong { display: block; margin-bottom: 7px; color: #dce7e8; font-size: 15px; }

.admin { max-width: 930px; display: grid; gap: 18px; }
.panel { padding: 18px; background: #152127; border: 1px solid #304149; border-radius: 6px; }
.panel > .muted { margin: 7px 0 0; }
.new-user { grid-template-columns: 1fr 1fr auto; align-items: end; margin-top: 17px; }
.new-user label { margin: 0; }
.new-user button { height: 42px; }
.users { margin-top: 16px; }
.users .row { grid-template-columns: minmax(0, 1fr) 110px 110px 112px; }
.role-badge { color: #9ddbd5; font-size: 13px; }
.state { color: #a8c8ac; font-size: 13px; }
.state.disabled { color: #e7a6a1; }

@media (max-width: 760px) {
  .drive { display: block; }
  .sidebar { min-height: 0; padding: 11px 10px; border-right: 0; border-bottom: 1px solid #304149; }
  .sidebar .brand { padding: 3px 8px 12px; }
  .nav { display: flex; overflow: auto hidden; }
  .nav button { flex: 1 0 max-content; }
  .side-note { display: none; }
  .topbar { min-height: 55px; padding: 0 14px; }
  .content { padding: 18px 12px 30px; }
  .user { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .toolbar { gap: 8px; }
  .breadcrumbs { order: 3; width: 100%; flex-basis: 100%; }
  .search { margin-left: auto; width: min(240px, calc(100% - 45px)); }
  .row { grid-template-columns: minmax(0, 1fr) 92px; gap: 8px; padding: 8px 10px; }
  .row .modified, .row .size, .row.heading .modified, .row.heading .size { display: none; }
  .actions { gap: 4px; }
  .notice strong { display: none; }
  .new-user { grid-template-columns: 1fr; }
  .new-user button { width: 100%; }
  .users .row { grid-template-columns: minmax(0, 1fr) auto; }
  .users .role-badge, .users .state, .users .row.heading .role-badge, .users .row.heading .state { display: none; }
}
