html { font-family: system-ui, sans-serif; color: #222; background: #fafafa; }
body { max-width: 960px; margin: 0 auto; padding: 1rem; }
/* ArduPilot-blue header bar so the logo's transparent PNG blends in. */
header { display: flex; justify-content: space-between; align-items: center;
         background: #3a7cb3; color: #fff;
         border-bottom: 1px solid #2a5e88;
         padding: 0.4rem 0.8rem; margin: -1rem -1rem 1rem; }
header h1 { font-size: 1.2rem; margin: 0; color: #fff; }
header .brand { display: flex; align-items: center; gap: 0.6rem;
                text-decoration: none; color: inherit; }
header .brand .logo { height: 2.4rem; width: auto; display: block; }
header nav { display: flex; gap: 1rem; align-items: center; font-size: 0.9rem; }
header nav a { color: #fff; }
header nav form.inline { display: inline; }
header nav button { background: #fff; color: #3a7cb3; border: 1px solid #2a5e88; }
header nav button:hover { background: #e6f0fa; }
main { padding: 0.5rem 0; }

.field { margin: 0.5rem 0; }
.field label { display: inline-block; min-width: 18em; }
input[type=text], input[type=password], input[type=number] {
    padding: 0.3rem; font-size: 1rem; min-width: 18em; }
button { padding: 0.4rem 0.9rem; font-size: 1rem; cursor: pointer; }
button.danger { background: #b03030; color: white; border: 1px solid #802020; }

table.entries { border-collapse: collapse; width: 100%; }
table.entries th, table.entries td {
    border: 1px solid #ccc; padding: 0.3rem 0.6rem; text-align: left; }
table.entries th { background: #eee; }
table.entries tr:nth-child(even) td { background: #f4f4f4; }
/* Stop time cells reflowing when localtime.js rewrites the visible
   text on the auto-refresh: tabular-nums keeps every digit the same
   width regardless of value (e.g. '08:11' and '11:11' line up). */
table.entries time {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

dl.entry-info { display: grid; grid-template-columns: max-content auto; column-gap: 1rem; }
dl.entry-info dt { font-weight: 600; }
dl.entry-info dd { margin: 0; font-family: monospace; }

.flash { padding: 0.5rem 0.8rem; margin: 0.5rem 0; border-radius: 3px; }
.flash-success { background: #dff5d0; border: 1px solid #80b060; }
.flash-error   { background: #fbd5d5; border: 1px solid #c06060; }

a { color: #2050a0; }

footer.version {
    margin: 2rem 1rem 0.5rem;
    color: #888;
    font-size: 0.85rem;
    text-align: right;
    font-family: monospace;
}
footer.version a { color: #888; text-decoration: none; }
footer.version a:hover { text-decoration: underline; }

/* Show/hide eye toggle attached to every password input by
   static/password-toggle.js. The button sits over the input's right
   edge; we extend the input's right padding so the text doesn't run
   under the icon. The selector covers both type=password (default)
   and type=text (after revealing) since the JS toggles the type. */
.password-wrap { display: inline-block; position: relative; vertical-align: middle; }
.password-wrap input[type=password],
.password-wrap input[type=text] {
    padding-right: 2.2rem;
}
.password-wrap button.toggle {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.15rem;
    cursor: pointer;
    color: #666;
    line-height: 0;
}
.password-wrap button.toggle:hover { color: #222; }
.password-wrap button.toggle svg { width: 18px; height: 18px; display: block; }

/* "Generate" button next to a passphrase field on the admin-add
   form, injected by admin-add.js. Sits alongside the password-wrap
   eye button on the same .field row. */
button.generate-passphrase {
    margin-left: 0.5rem;
    padding: 0.15rem 0.6rem;
    font-size: 0.9em;
    cursor: pointer;
    vertical-align: middle;
}

/* The "send this to the partner" blurb shown after creating one or
   more IDs via the admin add form. */
.flash-partner-text { background: #f3f8ff; border: 1px solid #b8d4f0; }
.flash-partner-text p { margin: 0 0 0.4rem; }
textarea.partner-text-box {
    display: block;
    width: 100%;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    white-space: pre;
    overflow: auto;
    margin-bottom: 0.4rem;
}
button.copy-partner-text {
    padding: 0.2rem 0.7rem;
    font-size: 0.9em;
    cursor: pointer;
}

p.hint { font-size: 0.9em; color: #555; max-width: 48em; }
