:root {
  --drive-bg: #f8f9fa;
  --drive-surface: #ffffff;
  --drive-border: #dadce0;
  --drive-text: #202124;
  --drive-text-secondary: #5f6368;
  --drive-link: #1a73e8;
  --drive-link-hover: #174ea6;
  --drive-row-hover: #f1f3f4;
  --docx-blue: #4285f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Google Sans", "Roboto", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--drive-bg);
  color: var(--drive-text);
  font-size: 14px;
  line-height: 1.4;
}

.drive-app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.drive-topbar {
  background: var(--drive-surface);
  border-bottom: 1px solid var(--drive-border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.drive-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}

.drive-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.drive-logo {
  width: 40px;
  height: 36px;
}

.drive-label {
  font-size: 22px;
  color: var(--drive-text-secondary);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.drive-divider {
  width: 1px;
  height: 28px;
  background: var(--drive-border);
  flex-shrink: 0;
}

.folder-title {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  color: var(--drive-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.btn-doc {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  border-radius: 18px;
  background: #1a73e8;
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease;
}

.btn-doc:hover {
  background: #1557b0;
}

.drive-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 24px;
}

.drive-toolbar {
  padding: 16px 0 8px;
  color: var(--drive-text-secondary);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.drive-table-wrap {
  background: var(--drive-surface);
  border: 1px solid var(--drive-border);
  border-radius: 8px;
  overflow: hidden;
}

.drive-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.drive-table thead th {
  height: 48px;
  padding: 0 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--drive-text-secondary);
  border-bottom: 1px solid var(--drive-border);
  background: var(--drive-surface);
  white-space: nowrap;
}

.drive-table tbody td {
  height: 48px;
  padding: 0 16px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: middle;
}

.drive-table tbody td.col-date,
.drive-table tbody td.col-size,
.drive-table tbody td.col-action {
  white-space: nowrap;
}

.drive-table tbody tr:last-child td {
  border-bottom: none;
}

.drive-table tbody tr:hover {
  background: var(--drive-row-hover);
}

.col-name {
  width: 42%;
}

.col-date {
  width: 18%;
  color: var(--drive-text-secondary);
  font-size: 13px;
}

.col-date.is-hidden {
  color: transparent;
}

.col-size {
  width: 16%;
  text-align: left;
  color: var(--drive-text-secondary);
  font-size: 13px;
}

.col-action {
  width: 14%;
  min-width: 72px;
  text-align: right;
}

.drive-table thead .col-size {
  text-align: left;
}

.btn-download {
  display: inline-block;
  color: var(--drive-link);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 0;
}

.btn-download:hover {
  color: var(--drive-link-hover);
  text-decoration: underline;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.item-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-icon svg {
  width: 24px;
  height: 24px;
}

.item-icon.folder svg {
  fill: #5f6368;
}

.item-icon.link svg {
  fill: #34a853;
}

.item-icon.docx svg {
  fill: var(--docx-blue);
}

.drive-table tbody tr.row-doc-item {
  background: #f8fbff;
}

.drive-table tbody tr.row-doc-item:hover {
  background: #eef4ff;
}

.item-badge-doc {
  background: #e6f4ea;
  color: #137333;
}

.item-name {
  font-size: 14px;
  color: var(--drive-text);
  min-width: 0;
  line-height: 1.35;
}

.item-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e8f0fe;
  color: #174ea6;
  font-size: 11px;
  font-weight: 500;
  vertical-align: middle;
}

.item-name.is-folder {
  font-weight: 500;
}

.item-name a {
  color: inherit;
  text-decoration: none;
}

.item-name a:hover {
  text-decoration: underline;
}

.col-size.empty {
  color: #80868b;
}

.drive-footer {
  text-align: center;
  padding: 20px 24px 28px;
  color: var(--drive-text-secondary);
  font-size: 12px;
}

.drive-footer code {
  background: #eef1f4;
  padding: 2px 6px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .drive-topbar-inner,
  .drive-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .drive-label {
    display: none;
  }

  .btn-doc {
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
  }

  .col-date,
  .drive-table thead .col-date,
  .drive-table tbody .col-date {
    display: none;
  }

  .col-name {
    width: 52%;
  }

  .col-size {
    width: 22%;
  }

  .col-action {
    width: 26%;
    min-width: 56px;
  }

  .item-name a {
    word-break: break-all;
  }
}
