* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

.container {
  max-width: 720px;
  margin: 40px auto;
  padding: 0 20px;
}

h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.subtitle {
  color: #666;
  margin-bottom: 32px;
}

/* Cards */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

/* Forms */
label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  margin-top: 12px;
}

label:first-child { margin-top: 0; }

input[type="text"],
input[type="password"],
input[type="url"] {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

input[type="file"] {
  margin-top: 4px;
  font-size: 14px;
}

.hint {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

button {
  display: inline-block;
  padding: 10px 20px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}

button:hover { background: #333; }
button:disabled { background: #999; cursor: not-allowed; }

/* Status messages */
.status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  display: none;
}

.status.success { display: block; background: #e8f5e9; color: #2e7d32; }
.status.error { display: block; background: #fbe9e7; color: #c62828; }
.status.loading { display: block; background: #e3f2fd; color: #1565c0; }

/* Stats table */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 12px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

th {
  font-weight: 600;
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td.number { text-align: right; font-variant-numeric: tabular-nums; }
th.number { text-align: right; }

.scan-rate { font-weight: 600; }

.failed-syncs { color: #c62828; font-weight: 600; }

.no-data {
  text-align: center;
  color: #999;
  padding: 32px;
}

/* Nav */
.nav {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.nav button {
  margin-top: 0;
  background: #eee;
  color: #333;
  padding: 8px 16px;
  font-size: 13px;
}

.nav button.active { background: #111; color: #fff; }
.nav button:hover { background: #ddd; }
.nav button.active:hover { background: #333; }

.section { display: none; }
.section.active { display: block; }

/* Logout */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.logout-btn {
  background: none;
  color: #999;
  font-size: 13px;
  font-weight: 400;
  padding: 4px 8px;
  margin: 0;
}

.logout-btn:hover { color: #333; background: none; }
