:root { color-scheme: dark; }
* { box-sizing: border-box; }
body {
  font-family: Arial, system-ui, sans-serif; margin: 0;
  background: #0f1115; color: #e6e8eb; font-size: 14px;
}
a { color: #6db3f2; text-decoration: none; }
header { padding: 16px 24px; border-bottom: 1px solid #2a2e37; display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
header h1 { margin: 0; font-size: 17px; }
header .sub { color: #9aa0aa; font-size: 12px; }
nav { margin-left: auto; display: flex; gap: 4px; }
nav a { padding: 6px 12px; border-radius: 8px; color: #c4c8cf; font-size: 13px; }
nav a:hover { background: #1b2029; }
nav a.active { background: #1f6feb33; color: #6db3f2; }
main { padding: 22px 24px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { border: 1px solid #2a2e37; border-radius: 12px; padding: 14px 16px; background: #151922; }
.tile .n { font-size: 26px; font-weight: 700; }
.tile .l { color: #9aa0aa; font-size: 12px; margin-top: 2px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }

.panel { border: 1px solid #2a2e37; border-radius: 12px; background: #151922; margin-bottom: 16px; }
.panel h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #9aa0aa; padding: 12px 16px; border-bottom: 1px solid #2a2e37; }
.panel .body { padding: 8px 16px 14px; }
.panel.red h2 { color: #ff8a8a; }
.panel.amber h2 { color: #f0c674; }

.row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #20242d; font-size: 13px; }
.row:last-child { border-bottom: 0; }
.row .meta { color: #9aa0aa; font-size: 12px; }
.muted { color: #6b7280; }

table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #20242d; vertical-align: top; }
th { position: sticky; top: 0; background: #11151c; color: #9aa0aa; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: #141922; }
.tablewrap { border: 1px solid #2a2e37; border-radius: 12px; overflow: auto; max-height: calc(100vh - 150px); }

input.cell, select.cell {
  background: transparent; border: 1px solid transparent; color: #e6e8eb;
  font: inherit; padding: 3px 4px; border-radius: 6px; width: 100%; min-width: 70px;
}
input.cell:hover, select.cell:hover { border-color: #2f3540; }
input.cell:focus, select.cell:focus { border-color: #1f6feb; background: #0d1014; outline: none; }
td.saved input.cell, td.saved select.cell { border-color: #2ea04366; }

.pill { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.s-accepted { background: #2ea04333; color: #6fd08c; }
.s-declined { background: #f8514933; color: #ff8a8a; }
.s-pending  { background: #f0c67433; color: #f0c674; }
.s-other    { background: #6b728033; color: #c4c8cf; }
.t-expat    { color: #6db3f2; }
.t-national { color: #6fd08c; }

.certs { display: flex; gap: 3px; flex-wrap: wrap; }
.cert { width: 22px; height: 20px; border-radius: 5px; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.c-valid   { background: #2ea04333; color: #6fd08c; }
.c-tbd     { background: #3a3f4a; color: #9aa0aa; }
.c-expired { background: #f8514955; color: #ffb4b4; }
.c-na      { background: #21252e; color: #5a6068; }
.c-missing { background: #f0c67433; color: #f0c674; }

.visa-bad  { color: #ff8a8a; font-weight: 600; }
.visa-soon { color: #f0c674; font-weight: 600; }
