:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-synthesis: none;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f7fa;
  --surface-hover: #f0f4fa;
  --surface-active: #e9f1ff;
  --text: #16191f;
  --text-secondary: #667085;
  --text-tertiary: #98a2b3;
  --line: #e9edf3;
  --line-strong: #d8dee8;
  --blue: #176bff;
  --blue-hover: #0b5ce5;
  --blue-soft: #eaf2ff;
  --green: #168a55;
  --green-soft: #e8f8f0;
  --amber: #aa6200;
  --amber-soft: #fff4df;
  --red: #d92d20;
  --red-soft: #fff0ef;
  --shadow-menu: 0 16px 44px rgba(31, 42, 61, 0.14);
  --sidebar-width: 250px;
  --header-height: 92px;
  --radius-control: 8px;
  --radius-panel: 8px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151516;
  --surface: #1d1d1f;
  --surface-soft: #252527;
  --surface-hover: #2c2c2f;
  --surface-active: #202d45;
  --text: #f4f4f5;
  --text-secondary: #b4b5bb;
  --text-tertiary: #85868d;
  --line: #303034;
  --line-strong: #414147;
  --blue: #4d91ff;
  --blue-hover: #73a8ff;
  --blue-soft: #1c3152;
  --green: #66cf9b;
  --green-soft: #18392b;
  --amber: #f0b55c;
  --amber-soft: #3d2d18;
  --red: #ff7b70;
  --red-soft: #44211f;
  --shadow-menu: 0 18px 48px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 14px;
  background: var(--bg);
  color: var(--text-secondary);
  text-align: center;
}

.boot-screen p {
  margin: 0;
}

.boot-mark {
  display: flex;
  justify-content: center;
  gap: 6px;
  height: 18px;
}

.boot-mark span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  animation: boot-bounce 1s ease-in-out infinite;
}

.boot-mark span:nth-child(2) {
  animation-delay: 0.12s;
}

.boot-mark span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes boot-bounce {
  0%, 65%, 100% { transform: translateY(0); opacity: 0.45; }
  32% { transform: translateY(-8px); opacity: 1; }
}

.drive-app {
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
  background: var(--bg);
}

.sidebar {
  position: relative;
  z-index: 20;
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.brand img {
  display: block;
  width: 164px;
  max-width: 100%;
  height: 54px;
  object-fit: contain;
  object-position: left center;
}

.brand .brand-dark {
  display: none;
}

:root[data-theme="dark"] .brand .brand-light {
  display: none;
}

:root[data-theme="dark"] .brand .brand-dark {
  display: block;
}

.side-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 12px 12px 16px;
  scrollbar-width: thin;
}

.nav-section + .nav-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.nav-item:hover {
  background: var(--surface-hover);
}

.nav-item.active {
  background: var(--surface-active);
  color: var(--blue);
  font-weight: 600;
}

.nav-item .nav-emoji {
  width: 22px;
  flex: none;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}

.storage-box {
  margin: 0 14px 16px;
  padding: 15px 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.storage-title {
  margin-bottom: 12px;
  font-weight: 600;
}

.storage-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.storage-track span {
  display: block;
  height: 100%;
  min-width: 3px;
  max-width: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.storage-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 12px;
}

.storage-meta button {
  padding: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}

.workspace {
  min-width: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  position: relative;
  z-index: 15;
  height: var(--header-height);
  flex: 0 0 var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 0 26px 0 28px;
  background: var(--surface);
}

.mobile-menu {
  display: none;
}

.search-box {
  width: min(470px, 48vw);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-soft);
  transition: border-color 0.16s ease, background 0.16s ease;
}

.search-box:focus-within {
  border-color: color-mix(in srgb, var(--blue) 55%, transparent);
  background: var(--surface);
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--text-tertiary);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.avatar-button {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.icon-button.mobile-menu {
  display: none;
}

.icon-button:hover,
.avatar-button:hover {
  background: var(--surface-hover);
  color: var(--blue);
}

.icon-button:active,
.avatar-button:active {
  transform: translateY(1px);
}

.icon-button .badge-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface-soft);
  border-radius: 50%;
  background: var(--red);
}

.account-trigger {
  position: relative;
}

.avatar-button {
  width: auto;
  min-width: 44px;
  gap: 9px;
  padding: 0 9px 0 5px;
  background: transparent;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #f2b72b;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-menu,
.row-menu {
  position: absolute;
  z-index: 80;
  min-width: 170px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}

.account-menu {
  top: calc(100% + 10px);
  right: 0;
}

.account-menu button,
.row-menu button {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 11px;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.account-menu button:hover,
.row-menu button:hover {
  background: var(--surface-hover);
}

.account-menu button.danger,
.row-menu button.danger {
  color: var(--red);
}

.main-scroll {
  min-width: 0;
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 20px 34px 42px;
  background: var(--bg);
}

.page-shell {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
}

.page-heading {
  min-height: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}

.page-title {
  min-width: 0;
}

.page-title h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1.35;
  font-weight: 700;
}

.page-title p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  line-height: 1.6;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.breadcrumb button {
  padding: 2px 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.breadcrumb button:last-of-type {
  color: var(--text);
  font-weight: 700;
}

.page-actions,
.selection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.button.primary:hover {
  border-color: var(--blue-hover);
  background: var(--blue-hover);
  color: #ffffff;
}

.button.ghost {
  border-color: transparent;
  background: transparent;
}

.button.danger {
  border-color: color-mix(in srgb, var(--red) 35%, var(--line));
  color: var(--red);
}

.button:disabled,
.icon-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.selection-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 10px;
  padding: 7px 10px 7px 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, var(--line));
  border-radius: var(--radius-control);
  background: var(--blue-soft);
  color: var(--blue);
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.file-table th {
  height: 52px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

.file-table td {
  height: 66px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.file-table tbody tr {
  transition: background 0.15s ease;
}

.file-table tbody tr:hover,
.file-table tbody tr.is-selected {
  background: var(--surface-hover);
}

.check-cell {
  width: 46px;
  text-align: center;
}

.size-cell {
  width: 130px;
}

.date-cell {
  width: 220px;
}

.action-cell {
  width: 62px;
  text-align: right;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.file-name-cell {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.file-kind-icon {
  position: relative;
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-secondary);
}

.file-kind-icon.folder {
  border: 0;
  background: transparent;
  color: var(--blue);
}

.file-kind-icon.image { color: #d99a00; background: var(--amber-soft); }
.file-kind-icon.video { color: #d94a3a; background: var(--red-soft); }
.file-kind-icon.audio { color: #8c5de6; background: #f2edff; }
.file-kind-icon.document { color: #2780d9; background: #eaf4ff; }
.file-kind-icon.archive { color: #a56231; background: #fff0e5; }

:root[data-theme="dark"] .file-kind-icon.audio { background: #302544; }
:root[data-theme="dark"] .file-kind-icon.document { background: #1c3248; }
:root[data-theme="dark"] .file-kind-icon.archive { background: #3a291f; }

.file-label {
  min-width: 0;
}

.file-label button {
  display: block;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-label button:hover {
  color: var(--blue);
}

.file-meta-line {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
}

.muted {
  color: var(--text-secondary);
}

.row-menu-wrap {
  position: relative;
  display: inline-flex;
}

.row-menu {
  top: calc(100% + 5px);
  right: 0;
}

.mobile-files {
  display: none;
}

.empty-state,
.loading-state,
.error-state {
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--text-secondary);
  text-align: center;
}

.state-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-tertiary);
}

.state-icon .icon {
  width: 26px;
  height: 26px;
}

.loading-state .state-icon .icon {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.data-list {
  border-top: 1px solid var(--line);
}

.data-row {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(140px, 220px) minmax(120px, 180px) auto;
  align-items: center;
  gap: 20px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.data-row:hover {
  background: var(--surface-hover);
}

.data-row-title {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.data-row-sub {
  margin-top: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 400;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.item-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.item-card h3 {
  margin: 0;
  font-size: 16px;
}

.item-card p {
  min-height: 44px;
  margin: 8px 0 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.item-card .price {
  margin: 12px 0;
  color: var(--blue);
  font-size: 22px;
  font-weight: 700;
}

.announcement-list {
  border-top: 1px solid var(--line);
}

.announcement-item {
  width: 100%;
  display: block;
  padding: 18px 8px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.announcement-item:hover h3 {
  color: var(--blue);
}

.announcement-item h3 {
  margin: 0;
  font-size: 16px;
}

.announcement-item p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  line-height: 1.65;
}

.profile-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 560px);
  gap: 34px;
  align-items: start;
  padding-top: 14px;
}

.profile-avatar {
  width: 112px;
  height: 112px;
  display: grid;
  place-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #f2b72b;
  color: #ffffff;
  font-size: 28px;
  font-weight: 700;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  color: var(--text-secondary);
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  outline: 0;
  background: var(--surface);
  color: var(--text);
}

.field textarea {
  min-height: 100px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 13%, transparent);
}

.field small {
  color: var(--text-tertiary);
  line-height: 1.55;
}

.admin-layout {
  height: calc(100dvh - var(--header-height) - 40px);
  min-height: 540px;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  border: 1px solid var(--line);
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.admin-nav {
  padding: 12px;
  border-right: 1px solid var(--line);
  overflow: auto;
}

.admin-nav button {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
}

.admin-nav button:hover,
.admin-nav button.active {
  background: var(--surface-active);
  color: var(--blue);
}

.admin-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--surface-soft);
}

.transfer-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 320px) 80px;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.2s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-content: center;
  padding: 24px;
  background: rgba(10, 16, 28, 0.42);
  backdrop-filter: blur(2px);
}

.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.24);
}

.modal.wide {
  width: min(920px, calc(100vw - 32px));
}

.modal-header {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  font-size: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-body {
  min-height: 0;
  overflow: auto;
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}

.preview-stage {
  min-height: min(58vh, 580px);
  display: grid;
  place-content: center;
  overflow: auto;
  background: var(--surface-soft);
}

.preview-stage img,
.preview-stage video {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
}

.preview-stage audio {
  width: min(520px, calc(100vw - 80px));
}

.preview-stage iframe {
  width: min(860px, calc(100vw - 72px));
  height: min(68vh, 680px);
  border: 0;
  background: #ffffff;
}

.toast-stack {
  position: fixed;
  z-index: 200;
  top: 18px;
  left: 50%;
  width: min(390px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
  color: var(--text);
  line-height: 1.5;
}

.toast.success { border-color: color-mix(in srgb, var(--green) 30%, var(--line)); }
.toast.error { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.toast.success .icon { color: var(--green); }
.toast.error .icon { color: var(--red); }

.login-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, 0.85fr);
  background: var(--bg);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 46px;
  background: #eef5ff;
  color: #17233d;
}

:root[data-theme="dark"] .login-brand {
  background: #1a2433;
  color: #f4f7ff;
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -18%;
  width: 58%;
  aspect-ratio: 1;
  border: 72px solid rgba(23, 107, 255, 0.1);
  border-radius: 50%;
}

.login-brand img {
  position: relative;
  z-index: 1;
  width: min(240px, 56%);
  height: 78px;
  object-fit: contain;
  object-position: left center;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.login-copy h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.2;
}

.login-copy p {
  margin: 18px 0 0;
  color: #52617a;
  font-size: 17px;
  line-height: 1.8;
}

:root[data-theme="dark"] .login-copy p {
  color: #b7c1d2;
}

.login-panel {
  display: grid;
  place-content: center;
  padding: 36px;
  background: var(--surface);
}

.login-box {
  width: min(390px, calc(100vw - 48px));
}

.login-box h2 {
  margin: 0;
  font-size: 25px;
}

.login-box > p {
  margin: 9px 0 28px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.passkey-button {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: var(--radius-control);
  background: var(--blue);
  color: #ffffff;
  cursor: pointer;
  font-weight: 600;
}

.passkey-button:hover {
  background: var(--blue-hover);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-tertiary);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-status {
  min-height: 22px;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.login-status.error {
  color: var(--red);
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1080px) {
  :root {
    --sidebar-width: 220px;
  }

  .main-scroll {
    padding-right: 24px;
    padding-left: 24px;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .date-cell {
    width: 185px;
  }
}

@media (max-width: 760px) {
  body {
    overflow: hidden;
  }

  .drive-app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(286px, calc(100vw - 52px));
    transform: translateX(-102%);
    transition: transform 0.22s ease;
  }

  .drive-app.drawer-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    display: block;
    border: 0;
    background: rgba(10, 16, 28, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
  }

  .drive-app.drawer-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .brand {
    height: 72px;
  }

  .topbar {
    height: 64px;
    flex-basis: 64px;
    gap: 8px;
    padding: 0 10px;
    border-bottom: 1px solid var(--line);
  }

  .icon-button.mobile-menu {
    display: inline-flex;
  }

  .search-box {
    width: auto;
    min-width: 0;
    height: 40px;
    flex: 1;
    padding: 0 11px;
    border-radius: var(--radius-control);
  }

  .search-box .icon {
    width: 17px;
    height: 17px;
  }

  .top-actions {
    gap: 4px;
  }

  .top-actions .upload-top,
  .top-actions .theme-top {
    display: none;
  }

  .icon-button,
  .avatar-button {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
  }

  .avatar {
    width: 34px;
    height: 34px;
  }

  .avatar-button > .icon {
    display: none;
  }

  .main-scroll {
    padding: 16px 12px 28px;
  }

  .page-heading {
    min-height: 42px;
    align-items: center;
    margin-bottom: 8px;
  }

  .page-title h1 {
    font-size: 19px;
  }

  .page-title p {
    display: none;
  }

  .page-actions .button span {
    display: none;
  }

  .page-actions .button {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .selection-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .desktop-files {
    display: none;
  }

  .mobile-files {
    display: block;
    border-top: 1px solid var(--line);
  }

  .mobile-file-row {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    min-height: 70px;
    padding: 9px 4px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-file-row.is-selected {
    background: var(--surface-hover);
  }

  .mobile-file-row .file-kind-icon {
    width: 32px;
    height: 32px;
  }

  .mobile-file-row .file-label button {
    font-size: 14px;
  }

  .mobile-file-row .file-meta-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-check {
    display: none;
  }

  .mobile-file-row.selecting .mobile-check {
    display: block;
  }

  .mobile-file-row.selecting {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
  }

  .data-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .data-row > :nth-child(2),
  .data-row > :nth-child(3) {
    display: none;
  }

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

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .admin-layout {
    height: calc(100dvh - 112px);
    grid-template-columns: 1fr;
  }

  .admin-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav button {
    width: auto;
    flex: none;
    white-space: nowrap;
  }

  .transfer-item {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .transfer-item > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal,
  .modal.wide {
    width: 100%;
    max-height: min(88dvh, 760px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .preview-stage {
    min-height: 48vh;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    min-height: 210px;
    padding: 26px;
  }

  .login-brand img {
    width: 180px;
    height: 56px;
  }

  .login-copy h1 {
    font-size: 28px;
  }

  .login-copy p {
    display: none;
  }

  .login-panel {
    align-content: start;
    padding: 34px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
