* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0; background: #f4f6f9; color: #1f2937;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: #111827; color: #fff; padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .brand { font-weight: 700; font-size: 16px; }
.topbar .brand span { color: #60a5fa; }
.topbar .right { font-size: 13px; color: #cbd5e1; }
.topbar .right a { color: #93c5fd; margin-left: 14px; }
.topbar .navlink { font-weight: 500; font-size: 13px; color: #cbd5e1; margin-left: 22px; }
.topbar .navlink:hover { color: #fff; text-decoration: none; }

.thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; border: 1px solid #e5e7eb; background: #f1f5f9; }
.url-cell { max-width: 280px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.badge.warn { background: #fef9c3; color: #854d0e; }
.badge.info { background: #dbeafe; color: #1e40af; }

.container { max-width: 1080px; margin: 24px auto; padding: 0 24px; }
.container.wide { max-width: 1560px; }
.card { background: #fff; border-radius: 12px; padding: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px; }
.card h2 { margin: 0 0 16px; font-size: 17px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef0f3; }
th { color: #6b7280; font-weight: 600; background: #fafbfc; }
tr:hover td { background: #fafbfc; }

label { display: block; font-size: 12px; color: #6b7280; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 13px;
}
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn {
  background: #2563eb; color: #fff; border: none; padding: 9px 18px;
  border-radius: 8px; font-size: 13px; cursor: pointer; display: inline-block;
}
.btn:hover { opacity: .9; text-decoration: none; color:#fff; }
.btn.gray { background: #6b7280; }
.btn.green { background: #16a34a; }
.btn.red { background: #dc2626; }
.btn.sm { padding: 5px 10px; font-size: 12px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.badge.on { background: #dcfce7; color: #166534; }
.badge.off { background: #fee2e2; color: #991b1b; }

.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 12px; word-break: break-all; }
.balance { font-size: 22px; font-weight: 700; color: #16a34a; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; }
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }

.muted { color: #9ca3af; font-size: 12px; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 16px; }

.login-wrap { max-width: 360px; margin: 90px auto; }
.login-wrap .card { padding: 28px; }
.login-wrap h1 { font-size: 20px; text-align: center; margin: 0 0 4px; }
.login-wrap h1 span { color: #2563eb; }
.login-wrap p.sub { text-align: center; color: #9ca3af; font-size: 12px; margin: 0 0 18px; }
