:root {
  color-scheme: dark;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background: #121212;
  color: #f6f6f6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: #121212;
}

button,
input,
a {
  font: inherit;
}

button,
a {
  border: 0;
  border-radius: 8px;
  color: #f7f7f7;
  background: #242424;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
a:hover {
  background: #333;
}

.sidebar {
  background: #1f1f1f;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid #2b2b2b;
}

.brand {
  font-size: 22px;
  font-weight: 700;
  padding: 4px 10px 22px;
}

.nav {
  text-align: left;
  background: transparent;
}

.nav.active {
  background: #086aa4;
}

.storage {
  margin-top: auto;
  padding: 12px 10px;
  color: #d7d7d7;
  font-size: 14px;
}

.label {
  margin-bottom: 10px;
  font-weight: 700;
}

.bar {
  height: 5px;
  background: #454545;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}

.bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: #76c7ff;
}

main {
  min-width: 0;
}

header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(18, 18, 18, 0.96);
  border-bottom: 1px solid #222;
}

header input[type="search"] {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: #252525;
  color: #fff;
  padding: 12px 18px;
}

.login {
  max-width: 440px;
  margin: 12vh auto;
  padding: 0 20px;
}

.login h1 {
  font-size: 44px;
  margin: 0 0 24px;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: #cfcfcf;
}

label input {
  border: 1px solid #333;
  border-radius: 8px;
  background: #1b1b1b;
  color: #fff;
  padding: 12px;
}

#loginError {
  color: #ff928c;
}

.hidden {
  display: none;
}

.gallery {
  padding: 24px;
}

.dropZone {
  display: grid;
  place-items: center;
  min-height: 92px;
  margin-bottom: 24px;
  border: 1px dashed #4a4a4a;
  border-radius: 8px;
  background: #17191b;
  color: #f4f4f4;
  transition: border-color 120ms ease, background 120ms ease;
}

.dropZone div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropZone strong {
  font-size: 16px;
}

.dropZone span {
  color: #a9cfe8;
  font-size: 14px;
}

.dropZone.dragging {
  border-color: #76c7ff;
  background: #102233;
}

.day {
  margin: 0 0 34px;
}

.driveHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.driveHeader h2 {
  margin: 0 auto 0 0;
}

.driveList {
  display: grid;
  gap: 8px;
}

.driveRow {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #181a1c;
}

.driveRow strong,
.driveRow span {
  display: block;
}

.driveRow span {
  margin-top: 4px;
  color: #b8b8b8;
  font-size: 14px;
}

.day h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: 150px;
  gap: 3px;
}

.tile {
  padding: 0;
  border-radius: 0;
  background: #080808;
  overflow: hidden;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

dialog {
  width: 100vw;
  height: 100vh;
  border: 0;
  padding: 0;
  max-width: none;
  max-height: none;
  background: #000;
}

dialog::backdrop {
  background: #000;
}

.viewerTop {
  position: absolute;
  inset: 0 0 auto 0;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  background: linear-gradient(#000b, transparent);
}

#viewerImage {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  header {
    flex-wrap: wrap;
    padding: 10px;
  }

  .gallery {
    padding: 14px 8px;
  }

  .driveRow {
    grid-template-columns: 1fr;
  }

  .dropZone {
    min-height: 74px;
    margin-bottom: 16px;
  }
}
