* {
  box-sizing: border-box;
}
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #142f48;
  background: #f3f6fa;
  font-size: 16px;
}
body {
  margin: 0;
}
[hidden] {
  display: none !important;
}
button,
input,
select {
  font: inherit;
}
button,
select,
input {
  border: 1px solid #c7d4df;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  background: #fff;
  color: inherit;
}
button {
  cursor: pointer;
  font-weight: 550;
}
button:hover,
a:hover {
  background: #e8f0f6;
}
button:focus-visible,
input:focus-visible,
a:focus-visible,
select:focus-visible {
  outline: 3px solid #408ca9;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.primary {
  background: #12665f;
  border-color: #12665f;
  color: white;
}
.primary:hover {
  background: #0b534e;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  letter-spacing: -0.055em;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 650;
}
.brand {
  font-weight: 700;
  font-size: 1.38rem;
  letter-spacing: -0.045em;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.mark {
  font-style: normal;
  background: linear-gradient(145deg, #77d9cf, #3eafa9);
  color: #0d3544;
  font-size: 1rem;
  font-weight: 850;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 0.65rem;
  box-shadow: inset 0 1px 1px #c6f8f0;
}
#login,
#storageWait {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 15% 1%, #b8dbdd, transparent 54%),
    linear-gradient(125deg, #e3edf3, #f5f6fa);
}
.login-card {
  width: min(420px, 92vw);
  background: #ffffffed;
  border: 1px solid #fff;
  padding: 2.2rem;
  border-radius: 24px;
  box-shadow: 0 20px 70px #1a405515;
}
.login-card h1 {
  font-size: 2rem;
  margin: 2.1rem 0 1.3rem;
}
.login-card form,
label {
  display: grid;
  gap: 0.4rem;
}
.login-card form {
  gap: 1rem;
}
.login-card small {
  display: block;
  margin-top: 1.4rem;
  line-height: 1.6;
  color: #536777;
}
.shell {
  display: grid;
  min-height: 100svh;
  grid-template-columns: 232px minmax(0, 1fr);
  background: #fff;
  color: #222520;
}
aside {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 26px 14px 16px;
  gap: 26px;
  background: #f6f6f3;
  border-right: 1px solid #e6e7e2;
}
aside .brand { padding: 0 8px; }
aside .brand .mark {
  color: white;
  background: #176b61;
  border-radius: 8px;
  box-shadow: none;
}
.workspaces { display: grid; gap: 6px; }
.workspaces label { font-size: .76rem; color: #5e645c; padding: 0 7px; }
.workspaces select { min-width: 0; width: 100%; font-weight: 550; }
.workspaces button, .identity button, nav button {
  background: transparent;
  color: #3c413b;
  text-align: left;
  border: 0;
}
.workspaces button, .identity button { padding: 6px 9px; font-size: .84rem; }
nav { display: grid; gap: 3px; }
nav button { display: flex; align-items: center; gap: 13px; min-height: 41px; }
nav button:hover, .workspaces button:hover, .identity button:hover { background: #eaece6; }
nav button[aria-current="page"] { background: #e0e9e2; color: #114c42; }
.nav-icon { width: 16px; height: 16px; position: relative; flex: none; display: inline-block; }
.nav-icon.files { height: 12px; border: 1.6px solid; border-radius: 2px; }
.nav-icon.files::before { content: ""; position: absolute; top: -4px; left: -1.5px; width: 7px; height: 3px; border: 1.6px solid; border-bottom: 0; border-radius: 2px 2px 0 0; }
.nav-icon.recent { border: 1.6px solid; border-radius: 50%; }
.nav-icon.recent::after { content: ""; position: absolute; left: 6px; top: 2px; width: 4px; height: 5px; border-left: 1.6px solid; border-bottom: 1.6px solid; }
.nav-icon.shares::before, .nav-icon.shares::after { content: ""; position: absolute; width: 9px; height: 5px; border: 1.6px solid; border-radius: 5px; transform: rotate(-42deg); }
.nav-icon.shares::before { left: 0; bottom: 1px; }
.nav-icon.shares::after { right: -1px; top: 1px; }
.nav-icon.trash { width: 12px; height: 13px; margin: 2px; border: 1.6px solid; border-radius: 1px 1px 3px 3px; }
.nav-icon.trash::before { content: ""; position: absolute; top: -3px; left: -3px; width: 15px; border-top: 2px solid; }
.identity { display: grid; gap: 3px; margin-top: auto; padding: 14px 0 0; border-top: 1px solid #dedfd9; justify-items: start; }
.identity span { font-size: .82rem; overflow-wrap: anywhere; padding: 0 8px; }
main { min-width: 0; padding: 0 clamp(18px, 3.5vw, 66px) 3rem; }
header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid #e8e9e4; }
.location { font-size: .82rem; color: #555c54; }
.location b { color: #a6ada3; margin: 0 .4rem; }
.searchbox { position: relative; display: flex; width: min(540px, 60%); }
.searchbox input { width: 100%; padding: 10px 12px 10px 38px; background: #f6f7f4; border: 1px solid #e4e6e0; }
.magnifier { position: absolute; left: 15px; top: 12px; border: 1.6px solid #606660; height: 12px; width: 12px; border-radius: 50%; }
.magnifier::after { content: ""; position: absolute; background: #606660; height: 1.6px; width: 6px; transform: rotate(45deg); left: 8px; top: 9px; }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 39px 0 25px; }
.titlebar > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.titlebar h1 { font-size: clamp(1.8rem, 3vw, 2.45rem); letter-spacing: -.045em; }
#actions, footer, .list-tools, #displayTools, .view-switch { display: flex; align-items: center; gap: 8px; }
#actions { flex-wrap: wrap; flex-shrink: 0; }
#newfolder::before { content: "+"; margin-right: 7px; }
#send::before { content: "↑"; margin-right: 7px; }
.shell button, .shell select, .shell input { border-radius: 7px; }
.list-tools { justify-content: space-between; gap: 10px; min-height: 48px; margin-bottom: 10px; }
#summary { font-size: .88rem; color: #62675f; }
#displayTools select, .view-switch button { font-size: .82rem; padding: 7px 9px; border-color: #d7dbd3; }
.view-switch { gap: 0; background: #f0f2ed; border-radius: 7px; padding: 2px; }
.view-switch button { border: 0; background: transparent; height: 30px; width: 33px; display: grid; place-items: center; color: #596257; }
.view-switch button[aria-pressed="true"] { color: #214e41; background: white; box-shadow: 0 1px 4px #2223; }
.list-glyph, .grid-glyph { display: block; width: 14px; height: 12px; }
.list-glyph { border-block: 2px solid; background: linear-gradient(currentColor,currentColor) center/100% 2px no-repeat; }
.grid-glyph { width: 6px; height: 5px; margin: -7px 8px 0 0; background: currentColor; box-shadow: 8px 0, 0 7px, 8px 7px; }
#listing { background: white; min-height: 90px; }
.row, .thead { display: grid; grid-template-columns: minmax(0, 1fr) 7rem 9rem 2.4rem; gap: 12px; align-items: center; padding: 10px 9px; }
.row { min-height: 58px; border-bottom: 1px solid #eceee8; }
.row:hover, .row:focus-within { background: #f6f8f4; }
.thead { color: #62675f; font-size: .79rem; border-block: 1px solid #e1e4dc; font-weight: 550; }
.row .label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 0;
  background: none;
  text-align: left;
  padding: 0;
  color: inherit;
  min-width: 0;
}
.filename {
  overflow-wrap: anywhere;
}
.row .icon,
.empty .icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  width: 2.5rem;
  height: 2.5rem;
  background: #eef4f8;
  color: #4c708a;
  font-size: 1.25rem;
}
.icon.folder {
  background: #deeee9;
  color: #217969;
}
.meta {
  font-size: 0.875rem;
  color: #526777;
}
.row .more {
  justify-self: end;
}
.empty {
  text-align: center;
  padding: 3.5rem 1rem;
  color: #4b6274;
}
.empty .icon {
  margin: 0 auto 0.8rem;
  width: 3.2rem;
  height: 3.2rem;
}
.empty strong {
  display: block;
  color: #294557;
}
.empty p {
  margin-top: 0.5rem;
}
.empty.drag,
#listing.drag {
  outline: 2px dashed #218478;
  outline-offset: 4px;
}
#crumbs button {
  border: 0;
  background: none;
  padding: 0.2rem 0.3rem;
  color: #336e74;
  font-size: 0.9rem;
}
#transfer {
  padding: 1rem;
  background: #deeeeb;
  margin-bottom: 1rem;
  border-radius: 12px;
  display: grid;
  gap: 0.65rem;
}
progress {
  width: 100%;
  accent-color: #147566;
}
dialog {
  border: 1px solid #d7e3e9;
  border-radius: 16px;
  padding: 1.4rem;
  max-width: min(92vw, 520px);
  width: 410px;
  color: inherit;
}
dialog::backdrop {
  background: #14334758;
  backdrop-filter: blur(3px);
}
dialog h2 {
  font-size: 1.3rem;
  overflow-wrap: anywhere;
}
#fields {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}
#fields input,
#fields select {
  width: 100%;
}
#fields a {
  padding: 0.55rem;
  color: #186b65;
}
footer {
  justify-content: end;
}
.danger {
  color: #9a3337;
}
#notice {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  max-width: 92vw;
  background: #17364a;
  color: white;
  padding: 0.8rem 1.25rem;
  border-radius: 12px;
  z-index: 4;
}
.folder::before {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 0.85rem;
  border-radius: 2px 3px 3px 3px;
  background: #418a76;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
}
.folder::after {
  content: "";
  position: absolute;
  width: 0.56rem;
  height: 0.24rem;
  border-radius: 2px 2px 0 0;
  background: #418a76;
  left: calc(50% - 0.625rem);
  bottom: 1.54rem;
}
.row .icon.folder,
.empty .icon.folder {
  font-size: 0;
}
.identity span {
  word-break: break-word;
}
#fields > div > button {
  margin: 0.3rem 0;
}

.row .more { border: 0; min-width: 32px; padding: 5px; background: transparent; }
.row .more:hover { background: #e3e9df; }
.row .icon { width: 38px; height: 38px; }
.row .icon.folder { background: #e6f2ec; }
.folder::before, .folder::after { background: #278977; }
#listing.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); align-content: start; gap: 12px; }
.grid .thead { display: none; }
.grid .empty { grid-column: 1/-1; }
.grid .row { position: relative; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 6px; padding: 16px; border: 1px solid #dfe5db; border-radius: 10px; }
.grid .label { grid-column: 1/-1; flex-direction: column; align-items: start; gap: 10px; min-height: 70px; }
.grid .filename { font-weight: 600; }
.grid .row .more { position: absolute; top: 9px; right: 8px; }
.grid .meta { font-size: .74rem; }
@media (max-width: 850px) {
  .shell { grid-template-columns: 185px minmax(0, 1fr); }
  .row, .thead { grid-template-columns: minmax(0,1fr) 5rem 2rem; }
  .when { display: none; }
  .grid .when { display: inline; }
  .location { display: none; }
  .searchbox { width: 100%; }
}
@media (max-width: 650px) {
  .shell { display: block; }
  aside { position: static; height: auto; display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 14px; gap: 10px; border: 0; }
  aside .brand { padding: 0; font-size: 1.06rem; gap: 6px; }
  aside .brand .mark { width: 29px; height: 29px; }
  .identity { grid-column: 2; grid-row: 1; border: 0; padding: 0; margin: 0; align-content: center; }
  .identity span { display: none; }
  .workspaces { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; }
  .workspaces select { width: auto; max-width: 100%; padding: 6px; font-size: .85rem; }
  .workspaces label { position: absolute; clip-path: inset(100%); }
  nav { display: flex; grid-column: 1/-1; flex-wrap: wrap; gap: 2px; }
  nav button { font-size: .78rem; padding: 6px; gap: 5px; min-height: 34px; }
  nav .nav-icon { transform: scale(.8); }
  header { min-height: 61px; }
  .titlebar { margin: 22px 0 12px; flex-wrap: wrap; gap: 12px; }
  .titlebar h1 { font-size: 1.85rem; }
  #actions button { font-size: .85rem; padding: 8px 10px; }
  .list-tools { flex-wrap: wrap; }
  .row, .thead { gap: 6px; grid-template-columns: minmax(0,1fr) 3.7rem 2rem; padding-inline: 3px; }
  #listing.grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .grid .row { padding: 12px; grid-template-columns: 1fr; }
}
