/* =========================================================
   SIGA — Authority Portal
   ========================================================= */
:root {
    --navy-950: #061324;
    --navy-900: #07182e;
    --navy-800: #0b223f;
    --navy-700: #14335c;
    --navy-600: #1d4476;
    --gold: #c9a227;
    --gold-deep: #a9861a;
    --gold-soft: #e3c96b;
    --ivory: #f7f5ef;
    --paper: #fff;
    --ink: #101c2c;
    --body: #4a586d;
    --muted: #788697;
    --line: #e2e7ee;
    --line-strong: #cdd5df;
    --bg: #f3f5f8;
    --green: #16815a;
    --green-soft: #e6f4ee;
    --red: #b23a3a;
    --red-soft: #fbeaea;
    --amber: #b47a13;
    --amber-soft: #fbf2df;
    --blue-soft: #eaf0f9;
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(16, 28, 44, .04), 0 8px 20px rgba(16, 28, 44, .04);
    --shadow: 0 18px 40px rgba(7, 24, 46, .09);
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --sidebar: 264px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.15;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

::selection {
    background: var(--gold-soft);
    color: var(--navy-950);
}

.mono {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: .86em;
    letter-spacing: -.01em;
}

.break {
    word-break: break-all;
}

.nowrap {
    white-space: nowrap;
}

.text-right {
    text-align: right;
}

.muted {
    color: var(--muted);
}

.truncate {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.rotate-180 {
    transform: rotate(180deg);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn svg {
    flex: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--gold {
    background: linear-gradient(135deg, #e3c96b, #c9a227 55%, #b18d1d);
    color: #171204;
    box-shadow: 0 10px 24px rgba(201, 162, 39, .26);
}

.btn--navy {
    background: var(--navy-800);
    color: #fff;
    box-shadow: 0 8px 20px rgba(7, 24, 46, .16);
}

.btn--navy:hover {
    background: var(--navy-700);
}

.btn--outline {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--navy-800);
}

.btn--outline:hover {
    border-color: var(--navy-600);
}

.btn--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--navy-800);
}

.btn--ghost:hover {
    background: var(--ivory);
}

.btn--danger {
    background: var(--red);
    color: #fff;
}

.btn--danger:hover {
    background: #962f2f;
}

.btn--sm {
    min-height: 38px;
    padding: 0 14px;
    font-size: 12.5px;
}

.btn--tiny {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11.5px;
    border-radius: 7px;
}

.btn--block {
    width: 100%;
}

.btn.is-copied {
    color: var(--green) !important;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    cursor: pointer;
}

.icon-btn:hover {
    border-color: var(--line-strong);
    color: var(--navy-800);
}

.icon-btn--danger:hover {
    background: var(--red-soft);
    border-color: #efcaca;
    color: var(--red);
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--line);
    color: var(--navy-700);
}

.icon-link:hover {
    border-color: var(--navy-600);
    background: var(--ivory);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

/* ---------- Shell / sidebar ---------- */
.admin-body {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    width: var(--sidebar);
    background:
        radial-gradient(420px 320px at 0% 0%, rgba(31, 78, 130, .55), transparent 70%),
        linear-gradient(170deg, #07182e, #061324);
    color: #aebdd0;
    border-right: 1px solid rgba(255, 255, 255, .06);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar__brand > a {
    display: flex;
    align-items: center;
    gap: 11px;
}

.sidebar__brand img {
    object-fit: contain;
    flex: none;
}

.sidebar__brand strong {
    display: block;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: .14em;
    color: #fff;
    line-height: 1.1;
}

.sidebar__brand small {
    display: block;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8fa2b9;
    margin-top: 2px;
}

.sidebar__close {
    display: none;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #9fb1c6;
    cursor: pointer;
}

.sidebar__nav {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
}

.sidebar__label {
    display: block;
    padding: 0 12px 8px;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #6d829c;
}

.sidebar__label--spaced {
    margin-top: 24px;
}

.sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin-bottom: 2px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: #aebdd0;
    transition: background .15s ease, color .15s ease;
}

.sidebar__nav a svg {
    flex: none;
    color: #7f95b0;
}

.sidebar__nav a:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.sidebar__nav a.is-active {
    background: rgba(227, 201, 107, .12);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(227, 201, 107, .18);
}

.sidebar__nav a.is-active svg {
    color: var(--gold-soft);
}

.sidebar__count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-950);
    font-size: 10.5px;
    font-style: normal;
    font-weight: 700;
}

.sidebar__foot {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 14px;
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 9px;
    background: rgba(227, 201, 107, .16);
    border: 1px solid rgba(227, 201, 107, .24);
    color: var(--gold-soft);
    font-family: var(--font-display);
    font-size: 16px;
}

.sidebar__user strong {
    display: block;
    font-size: 12px;
    color: #e8eef6;
    line-height: 1.3;
}

.sidebar__user small {
    display: block;
    font-size: 10px;
    color: #7f95b0;
}

.sidebar__logout {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 9px;
    background: transparent;
    color: #aebdd0;
    font-size: 12px;
    cursor: pointer;
}

.sidebar__logout:hover {
    background: rgba(255, 255, 255, .05);
    color: #fff;
}

/* ---------- Main ---------- */
.admin-main {
    margin-left: var(--sidebar);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 32px;
    background: rgba(243, 245, 248, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.admin-topbar__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.admin-topbar__kicker {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-topbar h1 {
    font-size: 23px;
    color: var(--navy-900);
}

.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.admin-topbar__date {
    font-size: 12px;
    color: var(--body);
    font-weight: 500;
}

.admin-topbar__date small {
    font-size: 9px;
    color: var(--muted);
    letter-spacing: .08em;
}

.admin-topbar__site {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--navy-700);
}

.admin-topbar__site:hover {
    border-color: var(--line-strong);
}

.admin-content {
    flex: 1;
    padding: 30px 32px 48px;
}

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 32px;
    border-top: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
}

/* ---------- Flash ---------- */
.flash-stack {
    position: fixed;
    right: 24px;
    top: 86px;
    z-index: 130;
    display: grid;
    gap: 10px;
    width: min(400px, calc(100vw - 48px));
}

.flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--ink);
    animation: flash-in .3s ease both;
    transition: opacity .4s ease, transform .4s ease;
}

.flash svg {
    flex: none;
    margin-top: 1px;
}

.flash button {
    margin-left: auto;
    border: 0;
    background: none;
    padding: 0;
    color: var(--muted);
    cursor: pointer;
}

.flash--success {
    border-color: #bfe3d2;
    background: #f2fbf6;
    color: #135c42;
}

.flash--error {
    border-color: #f0c4c4;
    background: #fdf4f4;
    color: #8e2e2e;
}

.flash.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

@keyframes flash-in {
    from { opacity: 0; transform: translateY(-8px); }
}

/* ---------- Page head ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 26px;
}

.page-head h2 {
    font-size: 29px;
    color: var(--navy-900);
}

.page-head p {
    margin-top: 5px;
    font-size: 13px;
    color: var(--body);
}

.page-head__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    flex: none;
}

.page-head__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
}

.back-link:hover {
    color: var(--navy-800);
}

/* ---------- Badges / tags ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge--valid { background: var(--green-soft); color: var(--green); border-color: #c7e8d9; }
.badge--pending { background: var(--amber-soft); color: var(--amber); border-color: #edddb7; }
.badge--suspended { background: #fdf0e4; color: #b65c17; border-color: #f1d4b8; }
.badge--revoked { background: var(--red-soft); color: var(--red); border-color: #efcaca; }
.badge--expired { background: #eef1f5; color: #5a6675; border-color: #dce2e9; }
.badge--info { background: var(--blue-soft); color: var(--navy-700); border-color: #d3deee; }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--blue-soft);
    color: var(--navy-700);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ---------- Stats ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.admin-stat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.admin-stat__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 11px;
}

.admin-stat__icon--green { background: var(--green-soft); color: var(--green); }
.admin-stat__icon--amber { background: var(--amber-soft); color: var(--amber); }
.admin-stat__icon--blue { background: var(--blue-soft); color: var(--navy-700); }
.admin-stat__icon--navy { background: var(--navy-800); color: var(--gold-soft); }

.admin-stat__label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
}

.admin-stat__value {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--navy-900);
    margin: 2px 0;
}

.admin-stat__hint {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
}

/* ---------- Grid / panels ---------- */
.admin-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-grid--2 {
    grid-template-columns: 1fr 1fr;
}

.admin-grid--form {
    grid-template-columns: 1fr 330px;
    align-items: start;
}

.admin-grid--license {
    grid-template-columns: 1fr 340px;
    align-items: start;
}

.stack {
    display: grid;
    gap: 18px;
    align-content: start;
}

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}

.stack > .panel,
.admin-grid > .panel {
    margin-bottom: 0;
}

.panel--pad {
    padding: 22px 24px;
}

.panel--muted {
    background: #f8f9fb;
}

.panel--danger {
    border-color: #efcaca;
    background: #fffafa;
}

.panel__title {
    font-size: 18px;
    color: var(--navy-900);
    margin-bottom: 4px;
}

.panel__sub {
    font-size: 11.5px;
    color: var(--muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.panel__head h3 {
    font-size: 18px;
    color: var(--navy-900);
}

.panel__head span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

.panel__head > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--navy-700);
    flex: none;
}

.panel__head > a:hover {
    color: var(--gold-deep);
}

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}

.admin-table--wide {
    min-width: 920px;
}

.admin-table th {
    padding: 11px 18px;
    text-align: left;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f8f9fb;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #eef1f5;
    font-size: 12px;
    color: var(--body);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr:hover {
    background: #fbfcfd;
}

.admin-table td strong {
    color: var(--ink);
}

.admin-table small {
    font-size: 10.5px;
    color: var(--muted);
}

.admin-licensee {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.admin-licensee__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--navy-800);
    color: var(--gold-soft);
    font-family: var(--font-display);
    font-size: 15px;
}

.admin-licensee strong,
.admin-licensee small {
    display: block;
    line-height: 1.35;
}

.admin-licensee strong {
    font-size: 12.5px;
}

.row-actions {
    display: inline-flex;
    gap: 5px;
}

.row-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
}

.row-actions a:hover {
    border-color: var(--navy-600);
    color: var(--navy-800);
    background: var(--ivory);
}

.empty-cell {
    padding: 26px !important;
    text-align: center;
    color: var(--muted) !important;
    font-size: 12px !important;
}

.domain-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---------- Filter bar ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.filter-bar__search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 240px;
    max-width: 420px;
    padding: 0 11px;
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
}

.filter-bar__search span {
    display: inline-flex;
    color: var(--muted);
}

.filter-bar__search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 12.5px;
}

.filter-bar select {
    height: 38px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    padding: 0 10px;
    font-size: 12px;
    color: var(--body);
    max-width: 220px;
}

.filter-bar__reset {
    font-size: 11.5px;
    color: var(--muted);
}

.filter-bar__reset:hover {
    color: var(--navy-800);
}

/* ---------- Pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 16px 18px;
    border-top: 1px solid var(--line);
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    font-size: 11.5px;
    color: var(--body);
}

.pagination a:hover {
    border-color: var(--line-strong);
}

.pagination a.is-current {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
}

/* ---------- Activity / queue ---------- */
.activity-list {
    padding: 14px 22px 18px;
}

.activity-list li {
    display: flex;
    gap: 11px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f3f6;
}

.activity-list li:last-child {
    border-bottom: 0;
}

.activity-list__dot {
    width: 7px;
    height: 7px;
    margin-top: 6px;
    flex: none;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, .14);
}

.activity-list__dot.is-danger {
    background: var(--red);
    box-shadow: 0 0 0 3px rgba(178, 58, 58, .14);
}

.activity-list strong {
    display: block;
    font-size: 12px;
    color: var(--ink);
    font-weight: 600;
}

.activity-list small {
    font-size: 10.5px;
    color: var(--muted);
}

.queue {
    padding: 10px 14px 14px;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;
    border-radius: 10px;
}

.queue-item:hover {
    background: #f8f9fb;
}

.queue-item__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 9px;
    background: var(--ivory);
    border: 1px solid var(--line);
    color: var(--navy-700);
    font-family: var(--font-display);
    font-size: 15px;
}

.queue-item__body {
    flex: 1;
    min-width: 0;
}

.queue-item__body strong {
    display: block;
    font-size: 12px;
    color: var(--ink);
}

.queue-item__body small {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
}

/* ---------- Snippet / seal ---------- */
.seal-admin {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    padding: 20px 22px;
    align-items: center;
}

.seal-admin__preview {
    width: 100%;
}

.seal-admin__preview > a,
.seal-admin__preview > svg {
    display: block;
}

.seal-admin__meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 20px;
}

.seal-admin__item span {
    display: block;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.seal-admin__item strong {
    font-size: 12px;
    color: var(--ink);
    font-weight: 600;
}

.snippet {
    border-top: 1px solid var(--line);
    padding: 16px 22px 20px;
    background: #fbfcfd;
}

.snippet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
}

.snippet__head span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.snippet pre {
    margin: 0;
    padding: 14px 16px;
    border-radius: 9px;
    background: var(--navy-950);
    color: #c5d6ea;
    overflow-x: auto;
    font-size: 10.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.snippet code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.snippet__note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-top: 9px;
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.5;
}

.snippet__note svg {
    flex: none;
    margin-top: 1px;
    color: var(--amber);
}

/* ---------- Forms ---------- */
.form {
    display: grid;
    gap: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.field--align-end {
    justify-content: flex-end;
}

.field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink);
}

.field label > span {
    color: var(--gold-deep);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    padding: 9px 11px;
    font-size: 13px;
    outline: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field select {
    height: 39px;
    padding-block: 0;
}

.field textarea {
    resize: vertical;
    line-height: 1.55;
    min-height: 80px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--navy-600);
    box-shadow: 0 0 0 3px rgba(29, 68, 118, .1);
}

.field small {
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.45;
}

.mono-input {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.form-actions {
    display: flex;
    gap: 9px;
}

.form-actions--stack {
    flex-direction: column;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 11.5px;
    color: var(--body);
    cursor: pointer;
}

.checkbox input {
    width: 15px;
    height: 15px;
    margin-top: 2px;
    accent-color: var(--navy-800);
    flex: none;
}

.checkbox--inline {
    align-items: center;
    padding-bottom: 8px;
    white-space: nowrap;
}

.domain-form {
    padding: 16px 22px 20px;
    border-top: 1px solid var(--line);
    background: #fbfcfd;
}

.domain-form__row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.domain-form__row .field {
    flex: 1;
    min-width: 240px;
}

.domain-form__hint {
    margin-top: 12px;
    font-size: 10.5px;
    line-height: 1.55;
    color: var(--muted);
}

/* ---------- Detail lists ---------- */
.detail-list {
    display: grid;
    gap: 0;
}

.detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #eef1f5;
    font-size: 11.5px;
}

.detail-list > div:last-child {
    border-bottom: 0;
}

.detail-list span {
    color: var(--muted);
    flex: none;
}

.detail-list strong {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin: 0;
    border-top: 1px solid var(--line);
}

.detail-grid > div {
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
}

.detail-grid > div:nth-child(odd) {
    padding-right: 18px;
}

.detail-grid > div:nth-child(even) {
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.detail-grid dt {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 3px;
}

.detail-grid dd {
    margin: 0;
    font-size: 12px;
    color: var(--ink);
    font-weight: 500;
    word-break: break-word;
}

.detail-grid--compact dd {
    font-size: 12.5px;
}

.mini-dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.mini-dl dt {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.mini-dl dd {
    margin: 2px 0 0;
    font-size: 11.5px;
    color: var(--ink);
    word-break: break-word;
}

.notes-block {
    font-size: 12px;
    color: var(--body);
    line-height: 1.65;
    white-space: normal;
}

.artwork-preview {
    width: 180px;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f8f9fb;
    border: 1px solid var(--line);
}

.artwork-preview img {
    display: block;
    width: 100%;
    height: auto;
}

.field input[type="file"] {
    padding: 8px;
    background: #fff;
    font-size: 12px;
}

.link-list {
    display: grid;
    gap: 2px;
}

.link-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 12px;
    color: var(--navy-700);
    font-weight: 500;
}

.link-list a:hover {
    color: var(--gold-deep);
}

.message-block {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 9px;
    background: #f8f9fb;
    border: 1px solid var(--line);
}

.message-block h4 {
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.message-block p {
    font-size: 12.5px;
    color: var(--body);
    line-height: 1.65;
}

.message-block--notes {
    background: #fdfaf0;
    border-color: #ede3c8;
}

/* ---------- Status ---------- */
.status-current {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 13px;
    border-radius: 9px;
    margin-bottom: 15px;
}

.status-current svg {
    flex: none;
    margin-top: 1px;
}

.status-current strong {
    display: block;
    font-size: 12.5px;
}

.status-current small {
    display: block;
    font-size: 10.5px;
    line-height: 1.45;
    opacity: .85;
}

.status-current--valid { background: var(--green-soft); color: #135c42; }
.status-current--pending { background: var(--amber-soft); color: #7d5307; }
.status-current--suspended { background: #fdf0e4; color: #8e4a13; }
.status-current--revoked { background: var(--red-soft); color: #8e2e2e; }
.status-current--expired { background: #eef1f5; color: #4d5866; }

/* ---------- Tabs ---------- */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    padding: 5px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
}

.tabs a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--body);
    white-space: nowrap;
}

.tabs a:hover {
    background: var(--ivory);
}

.tabs a.is-active {
    background: var(--navy-800);
    color: #fff;
}

.tabs em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-950);
    font-size: 9.5px;
    font-style: normal;
    font-weight: 700;
}

/* ---------- Workflow ---------- */
.workflow {
    display: grid;
    gap: 0;
    margin-top: 8px;
}

.workflow li {
    position: relative;
    padding: 0 0 20px 24px;
    font-size: 11.5px;
    color: var(--muted);
}

.workflow li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    background: #fff;
}

.workflow li::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 15px;
    bottom: 2px;
    width: 2px;
    background: var(--line);
}

.workflow li:last-child::after {
    display: none;
}

.workflow li.is-done {
    color: var(--ink);
    font-weight: 500;
}

.workflow li.is-done::before {
    border-color: var(--green);
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 129, 90, .12);
}

.workflow__hint {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--muted);
    line-height: 1.5;
}

/* ---------- Notices ---------- */
.notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
}

.notice p {
    font-size: 11.5px;
    color: var(--body);
    margin: 0;
}

.notice--info {
    background: var(--blue-soft);
    border-color: #d3deee;
}

.notice--info svg {
    color: var(--navy-700);
    flex: none;
    margin-top: 1px;
}

.notice a {
    color: var(--navy-700);
    font-weight: 600;
    text-decoration: underline;
}

/* ---------- Auth ---------- */
.auth-body {
    background: var(--navy-950);
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.02fr .98fr;
    min-height: 100vh;
}

.auth-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 52px;
    background:
        radial-gradient(800px 600px at 5% 5%, rgba(31, 78, 130, .6), transparent 65%),
        radial-gradient(600px 500px at 95% 95%, rgba(201, 162, 39, .1), transparent 65%),
        linear-gradient(160deg, #07182e, #061324);
    color: #fff;
    overflow: hidden;
}

.auth-aside::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(80% 80% at 40% 30%, #000, transparent);
    pointer-events: none;
}

.auth-brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 13px;
}

.auth-brand img {
    object-fit: contain;
    flex: none;
}

.auth-brand strong {
    display: block;
    font-family: var(--font-display);
    font-size: 23px;
    letter-spacing: .16em;
    line-height: 1.1;
}

.auth-brand small {
    display: block;
    font-size: 9.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8fa2b9;
    margin-top: 3px;
}

.auth-aside__body {
    position: relative;
    z-index: 1;
    max-width: 460px;
}

.auth-aside__body h1 {
    margin: 18px 0 18px;
    font-size: clamp(40px, 4.4vw, 58px);
    letter-spacing: -.03em;
}

.auth-aside__body > p {
    font-size: 14.5px;
    color: #b9c8db;
    max-width: 44ch;
}

.auth-list {
    display: grid;
    gap: 12px;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: 13px;
    color: #c3d0e0;
}

.auth-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-list svg {
    color: var(--gold-soft);
    flex: none;
}

.auth-aside__foot {
    position: relative;
    z-index: 1;
    font-size: 10.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #6d829c;
}

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background:
        radial-gradient(600px 400px at 60% 10%, rgba(201, 162, 39, .05), transparent 60%),
        var(--ivory);
}

.auth-card {
    width: min(430px, 100%);
    padding: 36px 36px 32px;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 30px 70px rgba(7, 24, 46, .12);
}

.auth-card__kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.auth-card h2 {
    margin: 12px 0 6px;
    font-size: 29px;
    color: var(--navy-900);
}

.auth-card__lead {
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 22px;
}

.auth-card .form {
    margin-top: 18px;
}

.auth-card .field label {
    font-size: 11.5px;
}

.auth-card__help {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 10.5px;
    line-height: 1.6;
    color: var(--muted);
}

.auth-copy {
    margin-top: 24px;
    font-size: 10.5px;
    color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-grid--license {
        grid-template-columns: 1fr;
    }

    .admin-grid--form {
        grid-template-columns: 1fr 290px;
    }
}

@media (max-width: 1040px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 0 0 60px rgba(0, 0, 0, .4);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar__close {
        display: inline-flex;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-topbar__toggle {
        display: inline-flex;
    }

    .admin-grid--2 {
        grid-template-columns: 1fr;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        display: none;
    }
}

@media (max-width: 780px) {
    .admin-topbar {
        padding: 13px 18px;
    }

    .admin-topbar h1 {
        font-size: 20px;
    }

    .admin-topbar__date {
        display: none;
    }

    .admin-content {
        padding: 20px 18px 40px;
    }

    .admin-footer {
        padding: 16px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .page-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .page-head__actions {
        width: 100%;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid--form {
        grid-template-columns: 1fr;
    }

    .seal-admin {
        grid-template-columns: 1fr;
    }

    .seal-admin__preview {
        max-width: 210px;
        margin: 0 auto;
    }

    .seal-admin__meta {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid > div:nth-child(even) {
        padding-left: 0;
        border-left: 0;
    }

    .detail-grid > div:nth-child(odd) {
        padding-right: 0;
    }

    .filter-bar {
        align-items: stretch;
    }

    .filter-bar__search {
        max-width: none;
    }

    .filter-bar select {
        max-width: none;
        flex: 1;
    }

    .auth-main {
        padding: 32px 18px;
    }

    .auth-card {
        padding: 28px 22px 26px;
    }

    .auth-card h2 {
        font-size: 25px;
    }

    .flash-stack {
        top: 76px;
        right: 14px;
    }

    .panel__head {
        padding: 15px 18px;
    }

    .panel--pad {
        padding: 18px;
    }
}
