:root {
  --bg: #f7fafc;
  --ink: #183044;
  --muted: #687789;
  --line: #dce7ef;
  --panel: #ffffff;
  --blue: #2f80ed;
  --blue-dark: #1f63b5;
  --green: #21a67a;
  --coral: #ff765f;
  --yellow: #ffd166;
  --shadow: 0 18px 45px rgba(24, 48, 68, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.10), transparent 34%),
    linear-gradient(225deg, rgba(33, 166, 122, 0.10), transparent 36%),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--green);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(33, 166, 122, 0.22);
}

button:hover {
  filter: brightness(0.96);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

button.primary {
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(47, 128, 237, 0.22);
}

button.ghost {
  color: var(--ink);
  background: #eef5f9;
  box-shadow: none;
}

.shell {
  width: min(1050px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 24px;
  min-height: 170px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

h1 {
  font-size: 4.25rem;
}

h2 {
  font-size: 1.75rem;
}

.hero-art {
  position: relative;
  height: 150px;
}

.folder-shape,
.file-shape {
  position: absolute;
  display: block;
  border: 3px solid rgba(24, 48, 68, 0.18);
  box-shadow: var(--shadow);
}

.folder-shape {
  right: 0;
  bottom: 10px;
  width: 140px;
  height: 92px;
  border-radius: 8px;
  background: var(--yellow);
}

.folder-shape::before {
  content: "";
  position: absolute;
  left: -3px;
  top: -28px;
  width: 72px;
  height: 30px;
  border: 3px solid rgba(24, 48, 68, 0.18);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--yellow);
}

.file-shape {
  width: 54px;
  height: 70px;
  border-radius: 8px;
  background: #ffffff;
}

.file-a {
  right: 92px;
  bottom: 42px;
  transform: rotate(-10deg);
}

.file-b {
  right: 28px;
  bottom: 70px;
  background: #e8f3ff;
  transform: rotate(11deg);
}

.auth-layout {
  display: grid;
  gap: 12px;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.panel,
.upload-panel,
.file-list-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.panel {
  display: grid;
  gap: 16px;
  padding: 24px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
  outline: none;
}

input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  accent-color: var(--blue);
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.16);
}

.drive {
  display: grid;
  gap: 16px;
}

.topbar,
.upload-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar {
  padding: 18px 0 6px;
}

.upload-panel {
  padding: 18px;
}

.file-picker {
  flex: 1;
  min-width: 0;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker span {
  display: flex;
  align-items: center;
  min-height: 56px;
  overflow: hidden;
  border: 2px dashed #a9c3d8;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--muted);
  background: #f7fbff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message {
  min-height: 28px;
  color: var(--blue-dark);
  font-weight: 800;
}

.message.error {
  color: #b9312a;
}

.file-list-wrap {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

td:first-child {
  max-width: 420px;
  overflow-wrap: anywhere;
  font-weight: 800;
}

td:last-child {
  width: 1%;
  white-space: nowrap;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--green);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(33, 166, 122, 0.18);
}

.file-actions {
  display: flex;
  gap: 8px;
}

.delete-file {
  min-height: 40px;
  padding: 0 14px;
  background: #d94d3f;
  box-shadow: 0 8px 18px rgba(217, 77, 63, 0.18);
}

.empty {
  display: grid;
  gap: 6px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty strong {
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 22px, 1050px);
    padding-top: 18px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    font-size: 2.75rem;
  }

  .hero-art {
    height: 104px;
  }

  .folder-shape {
    right: 16px;
    width: 110px;
    height: 70px;
  }

  .file-a {
    right: 92px;
    bottom: 30px;
  }

  .file-b {
    right: 35px;
    bottom: 52px;
  }

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

  .topbar,
  .upload-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar button,
  .upload-panel button {
    width: 100%;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    padding: 14px;
    border-bottom: 1px solid var(--line);
  }

  td {
    border: 0;
    padding: 4px 0;
  }

  td:last-child {
    width: auto;
    padding-top: 12px;
  }

  .download {
    justify-content: center;
    width: 100%;
  }

  .file-actions {
    display: grid;
  }

  .delete-file {
    width: 100%;
  }
}
