:root { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #182230; background: #f3f5f7; line-height: 1.5; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 40px 24px 64px; }
header, .section-heading, .pagination, .code-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header { margin-bottom: 24px; }
.eyebrow { margin: 0; color: #176249; font-weight: 700; letter-spacing: .16em; }
h1 { font-size: 30px; margin: 4px 0 0; }
h2 { font-size: 19px; margin: 0 0 12px; }
.card { background: #fff; border: 1px solid #dce2e8; border-radius: 12px; padding: 24px; margin: 20px 0; }
#login-panel { max-width: 420px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #aab7c4; border-radius: 6px; background: #fff; color: inherit; }
textarea { resize: vertical; }
button { font: inherit; font-weight: 600; background: #176249; color: #fff; border: 1px solid #176249; border-radius: 6px; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
button:hover { filter: brightness(.93); }
button.secondary { background: #fff; color: #263b4e; border-color: #b8c4ce; }
button.danger { color: #a42a28; border-color: #d7aaa9; background: #fff; padding: 6px 12px; }
button:disabled { cursor: default; opacity: .45; filter: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #74bda5; outline-offset: 3px; }
#login-form button { margin-top: 18px; width: 100%; }
.muted { color: #5b6c7b; font-size: 14px; }
.issue-form, .app-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: end; margin: 20px 0; }
.issue-form { grid-template-columns: minmax(170px,1fr) 110px minmax(140px,1fr) auto; }
.app-list { display: grid; gap: 10px; }
.app-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid #e4e9ed; padding-top: 12px; }
.invite-url { max-width: 230px; overflow-wrap: anywhere; }
a { color: #176249; }
a.button { display: inline-block; background: #176249; color: #fff; border: 1px solid #176249; border-radius: 6px; padding: 10px 16px; font-weight: 600; text-decoration: none; }
a.button.secondary { color: #263b4e; background: #fff; border-color: #b8c4ce; }
.redeem-main { max-width: 680px; }
.redeem-main .code-row { align-items: stretch; }
.redeem-main #code { min-width: 0; }
.app-heading { display: flex; align-items: center; gap: 12px; }
.app-heading img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.app-heading h2 { margin: 0; }
.redeem-main h3 { font-size: 16px; margin-top: 28px; }
.redeem-main #copy-link { margin-top: 10px; }
.redemption-dialog { width: min(680px, 100%); max-width: 100%; max-height: 90dvh; margin: auto auto 0; padding: 0; border: 0; border-radius: 16px 16px 0 0; color: inherit; background: #fff; }
.redemption-dialog::backdrop { background: rgb(0 0 0 / 35%); }
.dialog-heading { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid #e4e9ed; background: #fff; z-index: 1; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { padding: 2px 10px; font-size: 24px; }
.dialog-body { padding: 20px; }
.dialog-body .code-row { align-items: center; }
.dialog-body .code-row input { min-width: 0; }
.dialog-body #copy-link { margin: 0; }
.installation-note { padding: 14px; border: 1px solid #badbc8; border-radius: 6px; background: #edf8f2; }
.install-step { padding: 20px; margin-top: 16px; border: 1px solid #dce2e8; border-radius: 8px; }
.install-step h3 { margin: 0 0 18px; color: #176249; }
.install-step .button, .install-step button { margin-bottom: 4px; }
.issued { background: #edf8f2; border: 1px solid #badbc8; padding: 16px; border-radius: 8px; margin-top: 20px; }
#issued-code { font-family: ui-monospace, monospace; font-size: 20px; letter-spacing: .08em; }
#message { min-height: 24px; color: #a42a28; }
.section-heading h2 { margin: 0; }
.table-scroll { overflow-x: auto; margin-top: 16px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 14px; text-align: left; }
th { font-size: 12px; color: #627383; background: #f7f9fa; white-space: nowrap; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e4e9ed; vertical-align: top; }
td.device { max-width: 220px; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
td.note { max-width: 200px; overflow-wrap: anywhere; }
.badge { display: inline-block; padding: 2px 8px; background: #eef2f5; border-radius: 4px; white-space: nowrap; }
.badge.active { background: #e5f4ea; color: #176249; }
.badge.revoked, .badge.expired { background: #fbeceb; color: #97302d; }
.pagination { justify-content: flex-end; margin-top: 20px; font-size: 14px; }
[hidden] { display: none !important; }
.admin-page #message:empty { display: none; }
.admin-page .code-row input { min-width: 0; }
.admin-page .portal-address { margin-top: 20px; }
.admin-page summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.admin-page summary:focus-visible { outline: 3px solid #74bda5; outline-offset: 4px; }
.admin-page .settings-section { margin-top: 24px; }
.admin-page .settings-section + .settings-section { border-top: 1px solid #e4e9ed; padding-top: 24px; }
.admin-page .form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) { main { padding: 24px 16px; } .card { padding: 18px; } .issue-form, .app-form { grid-template-columns: 1fr; } .pagination { justify-content: space-between; gap: 8px; } h1 { font-size: 26px; } .section-heading { flex-wrap: wrap; } }
