* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #1f2430;
}

.hidden { display: none !important; }

.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 560px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
}

.login .card { max-width: 360px; text-align: center; }

h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: #7a8190; font-size: 13px; }
.err { color: #d33; font-size: 13px; min-height: 18px; }

input, button {
  font: inherit;
  border-radius: 8px;
}

input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #d5d9e0;
  background: #fff;
  margin: 6px 0;
}

input:focus { outline: none; border-color: #4f7cff; }

button {
  border: 1px solid transparent;
  cursor: pointer;
  padding: 9px 14px;
  background: #edf0f5;
}

button.primary { background: #4f7cff; color: #fff; }
button.ghost { background: transparent; border-color: #d5d9e0; }
button:hover { filter: brightness(0.96); }

.app header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.brand { font-weight: 700; font-size: 18px; }

nav { display: flex; gap: 4px; flex: 1; }
nav button {
  background: transparent;
  border: none;
  padding: 8px 14px;
  color: #5a6270;
}
nav button.active { color: #4f7cff; font-weight: 600; }

main { padding: 20px; max-width: 1100px; margin: 0 auto; }
.tab { display: none; }
.tab.active { display: block; }

.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar input { flex: 1; min-width: 220px; margin: 0; }
.actions { display: flex; gap: 8px; }

.breadcrumb { font-size: 14px; color: #5a6270; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb a { color: #4f7cff; cursor: pointer; text-decoration: none; }

table.list { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef0f3; font-size: 14px; }
th { background: #fafbfc; color: #7a8190; font-weight: 500; }
td a { color: #4f7cff; text-decoration: none; cursor: pointer; }
td button { padding: 4px 9px; font-size: 12px; margin-right: 4px; }

.size, .time, .ops, .prog { white-space: nowrap; }

.bar { height: 8px; background: #e8ebf0; border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar > div { height: 100%; background: #4f7cff; width: 0; transition: width .2s; }

.upload-progress { margin: 12px 0; padding: 12px; background: #fff; border-radius: 10px; font-size: 13px; }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row label { flex: 1; min-width: 160px; font-size: 13px; color: #5a6270; }

.device { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eef0f3; }
.device .name { font-weight: 600; min-width: 80px; }
.device code { font-size: 12px; word-break: break-all; flex: 1; color: #4a5261; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1f2430;
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10;
}
