* { box-sizing: border-box; margin: 0; padding: 0; font-family: "Segoe UI", system-ui, sans-serif; }
body { background: linear-gradient(180deg,#0a1628,#0d1f3a); color: #e6f0ff; min-height: 100vh; padding: 24px; }
.wrap { max-width: 1200px; margin: 0 auto; }
header h1 { font-size: 26px; margin-bottom: 4px; }
.sub { color: #8fa8c8; font-size: 13px; margin-bottom: 18px; }
code { background: #0e1f3c; padding: 2px 6px; border-radius: 5px; color: #7fd0ff; font-size: 12px; }

.input-card { background: #0e1f3c; border: 1px solid #1f3a64; border-radius: 12px; padding: 16px; margin-bottom: 20px; }
textarea { width: 100%; background: #0a1730; border: 1px solid #1f3a64; border-radius: 8px; color: #e6f0ff;
  padding: 12px; font-family: monospace; font-size: 13px; resize: vertical; }
.row-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.thr { color: #8fa8c8; font-size: 13px; }
.thr input { width: 56px; background: #0a1730; border: 1px solid #1f3a64; border-radius: 6px; color: #e6f0ff; padding: 4px 6px; }

button { background: #16294a; color: #cfe2ff; border: 1px solid #2a4a7c;
  border-radius: 8px; padding: 8px 16px; font-size: 13px; cursor: pointer; transition: .15s; font-weight: 600; }
button:hover { background: #1d3559; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: linear-gradient(90deg,#1e8fff,#2da0ff); color: #fff; border: none; }
button.primary:hover { filter: brightness(1.1); }
button.sm { padding: 5px 10px; font-size: 12px; }
button.loc { background: #2b1d4a; border-color: #4a2f7c; color: #d7c4ff; }
button.loc:hover { background: #3a2760; }

table { width: 100%; border-collapse: collapse; background: #0e1f3c; border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid #172c4e; vertical-align: middle; }
th { background: #12243f; color: #8fa8c8; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
tr:last-child td { border-bottom: none; }
td.mono { font-family: monospace; font-size: 12px; }
.muted { color: #6f88a8; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge.prov-proxypanel { background: #123a2a; color: #4ade80; }
.badge.prov-mobilehop { background: #3a2a12; color: #fbbf24; }
.badge.prov-unknown { background: #3a1212; color: #f87171; }
.badge.ok { background: #123a2a; color: #4ade80; }
.badge.dup { background: #4a1220; color: #ff6b8a; }
.badge.changed { background: #123a4a; color: #5cc8ff; }
.badge.cool { background: #3a3212; color: #f5d76e; }
.badge.err { background: #3a1212; color: #f87171; }

.arrow { color: #6f88a8; }
.new-ip { color: #5cc8ff; font-weight: 700; }
.old-ip { color: #8fa8c8; }
tr.bad td { background: #2a1220; }
.spin { display: inline-block; width: 13px; height: 13px; border: 2px solid #2a4a7c; border-top-color: #5cc8ff;
  border-radius: 50%; animation: sp .7s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }

.board-card { background: #0e1f3c; border: 1px solid #1f3a64; border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.board-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { background: #12243f; border: 1px solid #26456f; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  color: #cfe2ff; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  border-left: 4px solid #2a4a7c; transition: .15s; }
.chip:hover { background: #1a3055; }
.chip .chip-host { font-family: monospace; font-size: 10px; color: #6f88a8; font-weight: 400; }
.chip.prov-proxypanel { border-left-color: #4ade80; }
.chip.prov-mobilehop { border-left-color: #fbbf24; }
.chip.sel { background: #1e8fff22; border-color: #2da0ff; box-shadow: 0 0 0 1px #2da0ff inset; }
.chip.sel::after { content: "✓ đang chọn"; font-size: 10px; color: #5cc8ff; }
button.rm { padding: 5px 9px; background: #3a1220; border-color: #5a2030; color: #ff9bb0; }
button.rm:hover { background: #4a1626; }
.act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hidden { display: none; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #16294a; border: 1px solid #2a4a7c; padding: 12px 20px; border-radius: 10px; font-size: 13px; z-index: 10; }

.login-wrap { min-height: 90vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #0e1f3c; border: 1px solid #1f3a64; border-radius: 14px; padding: 32px; width: 340px; text-align: center; }
.login-card h1 { font-size: 22px; margin-bottom: 6px; }
.login-card input { width: 100%; background: #0a1730; border: 1px solid #1f3a64; border-radius: 8px;
  color: #e6f0ff; padding: 12px; margin: 16px 0 12px; font-size: 14px; }
.login-card button { width: 100%; padding: 12px; }
.err-msg { color: #ff6b8a; font-size: 13px; margin-top: 10px; }
.topbar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
