:root {
  font-family: "Google Sans", "Segoe UI", Roboto, Arial, sans-serif;
  color: #1f1f1f;
  background: #f8fafd;
  --blue: #0b57d0;
  --blue-soft: #c2e7ff;
  --blue-hover: #d3e3fd;
  --green: #188038;
  --red: #b3261e;
  --text: #1f1f1f;
  --muted: #5f6368;
  --line: #e0e3e7;
  --panel: #ffffff;
  --chrome: #edf2f8;
  --hover: #f1f3f4;
  --shadow: 0 1px 2px rgba(60, 64, 67, 0.18), 0 2px 6px rgba(60, 64, 67, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  background: #f8fafd;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.appShell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  min-height: 100vh;
  padding: 18px 12px 18px 10px;
  background: #f8fafd;
}

.brand {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  margin-bottom: 18px;
}

.brand strong {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: 0;
}

.driveLogo {
  position: relative;
  width: 38px;
  height: 34px;
}

.driveLogo span {
  position: absolute;
  display: block;
  border-radius: 6px;
}

.driveLogo span:nth-child(1) {
  left: 14px;
  top: 1px;
  width: 13px;
  height: 33px;
  background: #34a853;
  transform: skew(-30deg);
}

.driveLogo span:nth-child(2) {
  left: 4px;
  bottom: 1px;
  width: 34px;
  height: 12px;
  background: #4285f4;
  transform: skew(-30deg);
}

.driveLogo span:nth-child(3) {
  right: 2px;
  bottom: 1px;
  width: 16px;
  height: 28px;
  background: #fbbc04;
  transform: skew(30deg);
}

.newButton {
  height: 64px;
  min-width: 116px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 18px 2px;
  padding: 0 22px;
  color: #202124;
  background: #ffffff;
  border: 0;
  border-radius: 18px;
  box-shadow: var(--shadow);
  font-size: 16px;
  font-weight: 600;
}

.newButton span {
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

.newButton:hover {
  background: #f8fbff;
  box-shadow: 0 2px 5px rgba(60, 64, 67, 0.24), 0 5px 12px rgba(60, 64, 67, 0.16);
}

.navList {
  display: grid;
  gap: 3px;
}

.navItem,
.folderNode {
  min-height: 40px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 12px 0 20px;
  color: #3c4043;
  background: transparent;
  border: 0;
  border-radius: 0 22px 22px 0;
  text-align: left;
  font-size: 15px;
}

.navItem span:first-child,
.folderIcon {
  color: #3c4043;
  font-size: 18px;
  text-align: center;
}

.navItem:hover,
.folderNode:hover {
  background: #eef1f6;
}

.navItem.active,
.folderNode.active {
  color: #001d35;
  background: var(--blue-soft);
  font-weight: 600;
}

.folderSection {
  margin-top: 22px;
}

.folderSectionHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 8px 20px;
}

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

.folderSectionHeader strong {
  font-size: 14px;
}

.folderSectionHeader span {
  color: var(--muted);
  font-size: 12px;
}

.folderSectionHeader button,
.topActions button,
.infoButton {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #3c4043;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.folderSectionHeader button:hover,
.topActions button:hover,
.infoButton:hover {
  background: #edf0f4;
}

.folderTree {
  display: grid;
  gap: 2px;
}

.folderNode {
  grid-template-columns: 22px minmax(0, 1fr) auto;
  padding-left: calc(20px + var(--level) * 14px);
  min-height: 36px;
  font-size: 14px;
}

.folderNameWrap {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.folderName {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folderMiniStatus {
  width: max-content;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folderMiniStatus.active {
  color: #188038;
}

.folderMiniStatus.paused,
.folderMiniStatus.kept {
  color: #b06000;
}

.folderMiniStatus.deleted {
  color: #b3261e;
}

.folderMiniStatus.web {
  color: #1967d2;
}

.folderCount {
  color: var(--muted);
  font-size: 12px;
}

.storageBox {
  margin: 22px 20px 0;
  color: #3c4043;
  font-size: 14px;
}

.storageLine {
  height: 4px;
  margin-bottom: 12px;
  overflow: hidden;
  background: #dadce0;
  border-radius: 999px;
}

.storageLine::before {
  content: "";
  display: block;
  width: 36%;
  height: 100%;
  background: var(--blue);
}

.storageBox strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.storageBox p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.content {
  min-width: 0;
  padding: 18px 20px 28px 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(420px, 948px) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 10px;
}

.searchBox {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 948px;
  padding: 0 24px;
  color: #3c4043;
  background: #edf2f8;
  border: 1px solid transparent;
  border-radius: 999px;
}

.searchBox:focus-within {
  background: #ffffff;
  border-color: #dfe3ea;
  box-shadow: var(--shadow);
}

.searchBox span {
  font-size: 26px;
}

.searchBox input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #202124;
  background: transparent;
  font-size: 18px;
}

.topActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.syncState {
  min-width: 128px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #137333;
  background: #e6f4ea;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.syncState.busy {
  color: #b06000;
  background: #fef7e0;
}

.syncState.error {
  color: var(--red);
  background: #fce8e6;
}

.drivePanel {
  min-height: 620px;
  padding: 24px 22px 26px;
  background: #ffffff;
  border-radius: 24px;
}

.panelHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

h1 {
  margin: 0 0 8px;
  color: #202124;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
}

#folderDescription {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.settingsStrip {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 150px auto auto;
  align-items: end;
  gap: 10px;
  max-width: 860px;
  margin-bottom: 16px;
}

.settingsStrip label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.settingsStrip input {
  height: 40px;
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  color: #202124;
  background: #f8fafd;
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  outline: 0;
  font-weight: 600;
}

.settingsStrip input:focus {
  border-color: var(--blue);
  background: #ffffff;
}

.summaryPanel {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 160px)) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.syncOverview {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 16px;
  padding: 14px;
  background: #f8fafd;
  border: 1px solid #edf0f4;
  border-radius: 18px;
}

.syncOverviewTitle {
  display: grid;
  align-content: center;
  gap: 6px;
}

.syncOverviewTitle strong {
  color: #202124;
  font-size: 15px;
}

.syncOverviewTitle span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.syncStatusCards {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 8px;
}

.syncStatusCard {
  min-height: 94px;
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 10px;
  color: #202124;
  background: #ffffff;
  border: 1px solid #dfe3ea;
  border-radius: 14px;
  text-align: left;
}

.syncStatusCard:hover,
.syncStatusCard.selected {
  border-color: #a8c7fa;
  background: #e8f0fe;
}

.syncStatusCard span {
  min-height: 28px;
  color: #3c4043;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.syncStatusCard strong {
  font-size: 24px;
  line-height: 1;
}

.syncStatusCard small {
  color: var(--muted);
  font-size: 11px;
}

.syncStatusCard em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.25;
}

.syncStatusCard.active.selected,
.syncStatusCard.active.selected:hover {
  background: #e6f4ea;
  border-color: #b7e1cd;
}

.syncStatusCard.kept.selected,
.syncStatusCard.paused.selected {
  background: #fef7e0;
  border-color: #fdd663;
}

.syncStatusCard.deleted.selected {
  background: #fce8e6;
  border-color: #f4c7c3;
}

.syncStatusCard.web.selected {
  background: #e8f0fe;
  border-color: #a8c7fa;
}

.summaryPanel > div {
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 16px;
  background: #f8fafd;
  border: 1px solid #edf0f4;
  border-radius: 14px;
}

.summaryPanel strong {
  color: #202124;
  font-size: 22px;
  line-height: 1;
}

.summaryPanel span {
  color: var(--muted);
  font-size: 14px;
}

.serverCard {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
}

.serverCard > span {
  color: #fbbc04;
}

.serverCard div {
  min-width: 0;
}

.serverCard span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pathBar {
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding: 0 10px;
  border-bottom: 1px solid #edf0f4;
}

.pathLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.breadcrumbs {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.breadcrumbs button {
  min-height: 32px;
  max-width: 230px;
  padding: 0 12px;
  overflow: hidden;
  color: #1967d2;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs button:hover {
  background: #e8f0fe;
}

.crumbDivider {
  color: #9aa0a6;
}

.fileToolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.toolbarLeft,
.toolbarActions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbarActions {
  justify-content: flex-end;
}

.selectedCount {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.softButton,
.blueButton {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.softButton {
  color: #3c4043;
  background: #ffffff;
  border: 1px solid #dadce0;
}

.softButton:hover {
  background: #f8fafd;
  border-color: #c7ccd4;
}

.blueButton {
  color: #ffffff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.blueButton:hover {
  background: #0842a0;
}

.fileTable {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #edf0f4;
  border-radius: 12px;
}

.fileTable.dragging {
  outline: 3px solid rgba(11, 87, 208, 0.28);
}

.tableHead,
.tableRow {
  min-width: 720px;
  min-height: 48px;
  display: grid;
  grid-template-columns: 32px minmax(250px, 1fr) 100px 150px 120px 150px 84px;
  gap: 10px;
  align-items: center;
  padding: 0 16px;
}

.tableHead {
  color: var(--muted);
  background: #ffffff;
  border-bottom: 1px solid #edf0f4;
  font-size: 13px;
  font-weight: 700;
}

.tableRow {
  color: #202124;
  border-bottom: 1px solid #edf0f4;
  font-size: 14px;
}

.tableRow:last-child {
  border-bottom: 0;
}

.tableRow:hover {
  background: #f8fafd;
}

.rowCheck {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

.fileName {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #202124;
  background: transparent;
  border: 0;
  text-align: left;
  font-weight: 600;
}

.fileName span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fileIcon {
  width: 22px;
  color: var(--blue);
  font-size: 17px;
  text-align: center;
}

.statusBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 146px;
  padding: 0 10px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statusBadge.active {
  color: #137333;
  background: #e6f4ea;
}

.statusBadge.paused,
.statusBadge.kept {
  color: #b06000;
  background: #fef7e0;
}

.statusBadge.deleted {
  color: #b3261e;
  background: #fce8e6;
}

.statusBadge.web {
  color: #0b57d0;
  background: #e8f0fe;
}

.statusBadge.unknown {
  color: #5f6368;
  background: #f1f3f4;
}

.mutedCell {
  color: var(--muted);
}

.rowActions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.rowActions button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #3c4043;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
}

.rowActions button:hover {
  background: #edf0f4;
}

.rowActions button[title="Xóa"]:hover {
  color: var(--red);
  background: #fce8e6;
}

.emptyState {
  min-height: 210px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 16px;
}

.activityPanel {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
  padding: 18px 20px;
  background: #ffffff;
  border-radius: 24px;
}

.activityPanel h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
}

.activityPanel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.activityList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.activityItem {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  min-height: 78px;
  padding: 12px;
  background: #f8fafd;
  border: 1px solid #edf0f4;
  border-radius: 14px;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  background: #34a853;
  border-radius: 999px;
}

.dot.danger {
  background: #ea4335;
}

.activityItem strong,
.activityItem p,
.activityItem small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activityItem strong {
  font-size: 13px;
}

.activityItem p {
  margin: 4px 0;
  color: #3c4043;
  font-size: 13px;
}

.activityItem small,
.quiet {
  color: var(--muted);
  font-size: 12px;
}

.folderHint {
  display: none;
}

@media (max-width: 1180px) {
  body {
    min-width: 0;
  }

  .appShell {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .summaryPanel,
  .syncOverview,
  .syncStatusCards,
  .settingsStrip,
  .activityPanel {
    grid-template-columns: 1fr 1fr;
  }

  .serverCard {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  .appShell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    border-bottom: 1px solid #edf0f4;
  }

  .content {
    padding: 12px;
  }

  .topbar,
  .summaryPanel,
  .syncOverview,
  .syncStatusCards,
  .settingsStrip,
  .activityPanel {
    grid-template-columns: 1fr;
  }

  .drivePanel,
  .activityPanel {
    border-radius: 16px;
  }

  .fileToolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbarActions {
    justify-content: flex-start;
  }

  .tableHead {
    display: none;
  }

  .tableRow {
    min-width: 0;
    grid-template-columns: 26px minmax(0, 1fr);
    padding: 12px;
  }

  .tableRow > span,
  .rowActions {
    grid-column: 2;
  }

  .rowActions {
    justify-content: flex-start;
  }
}
