:root {
    --bg: #fffaf1;
    --panel: #ffffff;
    --ink: #2f261f;
    --muted: #6e6258;
    --line: #eadfce;
    --accent: #4f8a5b;
    --accent-dark: #32633d;
    --honey: #f1b84b;
    --cedar: #8a5a34;
    --danger: #b8433f;
    --shadow: 0 10px 30px rgba(47, 38, 31, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: var(--accent-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--honey);
    outline-offset: 3px;
}

.skip-link {
    background: var(--ink);
    color: #fff;
    font-weight: 800;
    left: 12px;
    padding: 10px 14px;
    position: fixed;
    top: -80px;
    z-index: 2000;
}

.skip-link:focus {
    top: 12px;
}

.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.site-header {
    align-items: center;
    background: #fff6e4;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 12px clamp(16px, 4vw, 40px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-message-alert {
    align-items: center;
    background: #fbe3df;
    border-bottom: 2px solid var(--danger);
    color: #7f2825;
    display: flex;
    font-weight: 800;
    gap: 10px;
    justify-content: center;
    padding: 10px 18px;
    text-align: center;
    text-decoration: none;
}

.admin-message-alert-icon {
    align-items: center;
    animation: message-alert-pulse 1.15s ease-in-out infinite;
    background: var(--danger);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.admin-message-alert-count {
    background: #fff;
    border-radius: 999px;
    min-width: 25px;
    padding: 2px 8px;
}

@keyframes message-alert-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.88); }
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    font-size: 1.15rem;
    font-weight: 800;
    gap: 10px;
    text-decoration: none;
}

.brand-mark {
    align-items: center;
    background: var(--cedar);
    border-radius: 8px;
    color: white;
    display: inline-flex;
    font-size: .85rem;
    height: 34px;
    justify-content: center;
    width: 34px;
}

nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.page {
    margin: 0 auto;
    max-width: 1100px;
    padding: 24px clamp(16px, 4vw, 40px) 48px;
}

.hero {
    display: grid;
    gap: 16px;
    padding: 28px 0;
}

.dashboard-hero {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(170px, 230px);
}

.dashboard-hero-copy {
    min-width: 0;
}

.dashboard-logo {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: block;
    height: auto;
    justify-self: end;
    max-width: 230px;
    width: 100%;
}

.login-hero {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
}

.eyebrow {
    color: var(--cedar);
    display: block;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.login-logo {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: block;
    height: auto;
    justify-self: end;
    max-width: 240px;
    width: 100%;
}

.login-layout {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.login-form h2,
.feature-panel h2 {
    margin-bottom: 8px;
}

.feature-panel {
    background: #fff8ec;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.feature-list {
    display: grid;
    gap: 0;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.feature-list li {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 3px;
    padding: 13px 0;
}

.feature-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.feature-list li:last-child {
    padding-bottom: 0;
}

.feature-list span {
    color: var(--muted);
}

.tutorial-section {
    margin-top: 28px;
}

.tutorial-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tutorial-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tutorial-card h3 {
    font-size: 1rem;
    margin: 0;
    padding: 16px 18px 18px;
}

.video-placeholder {
    align-items: center;
    aspect-ratio: 16 / 9;
    background:
        linear-gradient(135deg, rgba(149, 95, 50, .13), rgba(79, 143, 92, .12)),
        #fff8ec;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    flex-direction: column;
    font-size: .9rem;
    font-weight: 700;
    gap: 12px;
    justify-content: center;
    padding: 20px;
    text-align: center;
}

.video-embed {
    aspect-ratio: 16 / 9;
    background: #1f1b18;
}

.video-embed iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.video-play {
    background: var(--cedar);
    border-radius: 50%;
    display: grid;
    height: 54px;
    place-items: center;
    width: 54px;
}

.video-play::after {
    border-bottom: 9px solid transparent;
    border-left: 15px solid #fff;
    border-top: 9px solid transparent;
    content: "";
    margin-left: 4px;
}

h1, h2, h3 {
    line-height: 1.15;
    margin: 0 0 12px;
}

p {
    margin: 0 0 14px;
}

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

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.stat-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-card {
    background: #fff8ec;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.stat-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.stat-card span {
    color: var(--muted);
}

.card, .form-panel, .detail-panel, .empty-state {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.card {
    display: grid;
    gap: 8px;
}

.help-grid {
    margin-bottom: 28px;
}

.help-grid .card {
    min-height: 190px;
}

.help-grid .card-footer {
    align-self: end;
}

.honeypot {
    height: 1px;
    left: -10000px;
    overflow: hidden;
    position: absolute;
    top: auto;
    width: 1px;
}

.message-list {
    display: grid;
    gap: 14px;
}

.message-card {
    border-left: 5px solid transparent;
}

.message-card.is-new {
    border-left-color: var(--accent);
}

.message-status {
    background: #ece7de;
    border: 1px solid #cfc5b5;
    border-radius: 999px;
    color: #312a22;
    display: inline-block;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.2;
    padding: 5px 11px;
}

.message-status-new {
    background: #f8d7da;
    border-color: #d98c94;
    color: #741f27;
}

.message-status-in_progress {
    background: #fff0b8;
    border-color: #d8bd55;
    color: #594300;
}

.message-status-archived {
    background: #dcefdc;
    border-color: #8fbe92;
    color: #205426;
}

.message-status-blocked {
    background: #e2e5e9;
    border-color: #aab1ba;
    color: #303841;
}

.message-card-heading {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.message-card-heading h2 {
    margin-top: 8px;
}

.message-card-heading time {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: .9rem;
}

.message-preview {
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.message-detail .meta-list {
    margin-bottom: 22px;
}

.reminder-form {
    align-items: end;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
}

.reminder-form[hidden] {
    display: none;
}

.reminder-form label {
    min-width: min(100%, 240px);
}

.notice-inline {
    background: var(--soft);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 10px 12px;
}

.message-notes {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    padding-top: 20px;
}

.message-notes h2 {
    margin-top: 0;
}

.note-form {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 14px;
}

.note-form[hidden] {
    display: none;
}

.note-form textarea {
    min-height: 110px;
}

.note-list {
    display: grid;
    gap: 12px;
}

.message-note {
    background: var(--soft);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    padding: 12px 14px;
}

.message-note footer {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: .88rem;
    gap: 6px 12px;
    margin-top: 10px;
}

@media (prefers-reduced-motion: reduce) {
    .admin-message-alert-icon {
        animation: none;
    }
}

.message-body {
    background: #fff8ec;
    border: 1px solid var(--line);
    border-radius: 8px;
    line-height: 1.65;
    overflow-wrap: anywhere;
    padding: 18px;
}

.card h2, .card h3 {
    margin-bottom: 0;
}

.project-card-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.project-card-counts span {
    color: var(--muted);
    font-size: .9rem;
}

.project-card-counts strong {
    color: var(--ink);
}

.card-footer {
    align-items: center;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    padding-top: 12px;
}

.card-footer a {
    font-weight: 800;
}

.settings-section {
    margin: 28px 0;
}

.section-heading {
    margin-bottom: 12px;
}

.section-heading h2 {
    margin-bottom: 4px;
}

.admin-card {
    align-content: start;
}

.lookup-panel {
    margin-bottom: 18px;
}

.optional-panel summary {
    color: var(--accent-dark);
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 800;
    list-style-position: outside;
}

.optional-panel summary span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    margin-left: 6px;
}

.optional-panel[open] summary {
    margin-bottom: 14px;
}

.form-intro {
    margin-bottom: 16px;
}

.form-intro h2,
.form-intro p {
    margin-bottom: 4px;
}

.inventory-search {
    margin-bottom: 28px;
}

.inventory-heading {
    margin-top: 26px;
}

.count-label {
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
    vertical-align: middle;
}

.detail-copy {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 16px;
}

.detail-copy h2 {
    font-size: 1rem;
    margin-bottom: 6px;
}

.restore-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.restore-summary div {
    background: #fff8ec;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.restore-summary span,
.file-selection {
    font-size: .9rem;
}

.setup-panel .readiness-list {
    margin-bottom: 18px;
}

.setup-result {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.lookup-result {
    align-content: start;
}

.list-tools {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) auto;
    margin-bottom: 14px;
}

.scanner-modal {
    align-items: center;
    background: rgba(32, 27, 24, 0.72);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 18px;
    position: fixed;
    z-index: 1000;
}

.scanner-dialog {
    background: var(--panel);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 560px;
    padding: 18px;
    width: min(100%, 560px);
}

.scanner-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.scanner-video {
    aspect-ratio: 4 / 3;
    background: #201b18;
    border-radius: 8px;
    display: block;
    object-fit: cover;
    width: 100%;
}

.scanner-reader {
    background: #201b18;
    border-radius: 8px;
    min-height: 240px;
    overflow: hidden;
    width: 100%;
}

.scanner-reader video {
    object-fit: contain;
    width: 100%;
}

.scanner-reader img {
    display: block;
    max-height: 260px;
    object-fit: contain;
    width: 100%;
}

.scanner-reader:empty {
    align-items: center;
    display: flex;
    justify-content: center;
}

.scanner-status {
    margin-top: 12px;
}

.compact-form-row {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 1fr) auto;
}

.item-card {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.item-card.has-photo {
    grid-template-columns: auto 1fr;
}

.item-card-thumb {
    aspect-ratio: 1 / 1;
    background: #fff8ec;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    height: 78px;
    overflow: hidden;
    width: 78px;
}

.item-card-thumb img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.item-card-body {
    min-width: 0;
}

.member-card {
    min-height: 128px;
    position: relative;
}

.member-card-actions {
    align-items: flex-start;
    display: flex;
    gap: 8px;
    position: absolute;
    right: 16px;
    top: 14px;
    z-index: 3;
}

.member-card-actions details {
    position: relative;
}

.member-card-actions summary {
    color: var(--accent-dark);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    text-decoration: underline;
}

.member-card-actions summary::-webkit-details-marker {
    display: none;
}

.member-edit-popover {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
    min-width: 220px;
    padding: 12px;
    position: absolute;
    right: 0;
    top: 28px;
}

.danger-link {
    color: var(--danger);
    font-weight: 700;
    text-decoration: underline;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

button, .button {
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    min-height: 42px;
    padding: 9px 14px;
    text-decoration: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

button:hover, .button:hover {
    background: var(--accent-dark);
}

.button.secondary {
    background: var(--cedar);
}

.danger-button {
    background: var(--danger);
}

.danger-button:hover {
    background: #8f302d;
}

.danger-zone .detail-panel {
    border-color: #e6b7b4;
}

.delete-dialog {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: var(--ink);
    max-width: 520px;
    padding: 22px;
    width: min(calc(100% - 32px), 520px);
}

.delete-dialog::backdrop {
    background: rgba(32, 27, 24, 0.72);
}

.delete-dialog-actions {
    align-items: center;
    display: flex;
    gap: 36px;
    justify-content: space-between;
    margin-top: 22px;
}

.delete-dialog-actions form {
    margin: 0;
}

.link-button {
    background: transparent;
    color: var(--accent-dark);
    min-height: 0;
    padding: 0;
}

.inline {
    display: inline;
}

label {
    display: grid;
    font-weight: 700;
    gap: 6px;
}

input, select, textarea {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    padding: 10px 12px;
    width: 100%;
}

[hidden] {
    display: none !important;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

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

.form-subsection {
    border-top: 1px solid var(--line);
    margin-top: 18px;
    padding-top: 18px;
}

.form-full {
    grid-column: 1 / -1;
}

input[readonly] {
    background: #fff8ec;
    color: var(--muted);
}

.flash {
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.notice {
    background: #e8f4e9;
    color: #244f2d;
}

.warning-panel {
    background: #fff4d6;
    border: 1px solid #d8b762;
    border-radius: 8px;
    color: #4f3a08;
    margin-bottom: 28px;
    padding: 16px 18px;
}

.warning-panel h2 {
    font-size: 1.15rem;
}

.warning-panel p:last-child {
    margin-bottom: 0;
}

.form-error {
    background: #fae7e4;
    border-radius: 6px;
    color: #7e2a27;
    font-weight: 700;
    padding: 10px 12px;
}

.plugin-grid {
    margin-bottom: 24px;
}

.update-banner {
    align-items: center;
    background: #e8f4e9;
    border: 1px solid #b8d9bf;
    border-radius: 12px;
    color: #244f2d;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin: 0 0 24px;
    padding: 14px 16px;
}

.update-banner div {
    display: grid;
    gap: 3px;
}

.update-banner .button {
    flex: 0 0 auto;
}

.error {
    background: #fae7e4;
    color: #7e2a27;
}

.pill {
    background: #f7ecd7;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    display: inline-flex;
    font-size: .88rem;
    padding: 4px 9px;
}

.meta-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 0;
}

.meta-list div {
    background: #fff8ec;
    border-radius: 8px;
    padding: 10px;
}

.meta-list dt {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.meta-list dd {
    margin: 2px 0 0;
}

.section-heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.photo-panel {
    margin-top: 18px;
}

.photo-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin: 12px 0 16px;
}

.photo-tile {
    display: grid;
    gap: 8px;
    margin: 0;
}

.photo-tile figcaption {
    color: var(--muted);
    font-size: .82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-tile form {
    display: flex;
    justify-content: flex-start;
}

.photo-tile .danger-button {
    font-size: .88rem;
    min-height: 34px;
    padding: 6px 10px;
}

.photo-thumb {
    aspect-ratio: 1 / 1;
    background: #fff8ec;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: block;
    overflow: hidden;
}

.photo-thumb img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.photo-upload {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
}

.photo-form-field {
    border: 0;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    margin: 8px 0 0;
    padding: 20px 0 0;
}

.photo-form-field legend {
    font-size: 1.05rem;
    font-weight: 700;
    padding: 0 8px 0 0;
}

.photo-form-field legend .muted {
    font-size: 0.9rem;
    font-weight: 400;
}

.photo-form-grid {
    margin-bottom: 4px;
}

.photo-viewer {
    display: grid;
    gap: 16px;
}

.photo-viewer img {
    border-radius: 8px;
    display: block;
    height: auto;
    max-width: 100%;
}

.photo-viewer h1 {
    overflow-wrap: anywhere;
}

.qr-label {
    align-items: center;
    aspect-ratio: 1 / 1;
    background: #fff;
    border: 10px solid #fff;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 1px var(--line);
    display: flex;
    justify-content: center;
    max-width: 260px;
    width: 100%;
}

.qr-label canvas,
.qr-label img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.label-url {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 10px 16px;
    }

    nav {
        gap: 8px 12px;
        justify-content: flex-start;
    }

    .page {
        padding: 16px 14px 36px;
    }

    .hero {
        gap: 10px;
        padding: 18px 0;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .login-hero,
    .login-layout {
        grid-template-columns: 1fr;
    }

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

    .message-card-heading {
        display: grid;
        gap: 4px;
    }

    .dashboard-logo {
        justify-self: center;
        margin-top: 8px;
        max-width: 210px;
    }

    .login-logo {
        justify-self: center;
        margin-top: 8px;
        max-width: 210px;
    }

    .card,
    .form-panel,
    .detail-panel,
    .empty-state {
        padding: 15px;
    }

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

    .restore-summary {
        grid-template-columns: 1fr;
    }

    .card-footer {
        align-items: flex-start;
        gap: 10px;
    }

    .actions {
        align-items: stretch;
        flex-direction: column;
        margin: 14px 0 4px;
    }

    .login-form .actions {
        flex-direction: row;
    }

    .login-form .actions > button,
    .login-form .actions > .button {
        flex: 1;
        width: auto;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .update-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .list-tools,
    .compact-form-row {
        grid-template-columns: 1fr;
    }

    button,
    .button,
    .actions > form,
    .actions > form button,
    .delete-dialog-actions form,
    .delete-dialog-actions button {
        justify-content: center;
        width: 100%;
    }

    .delete-dialog-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .member-card {
        padding-top: 48px;
    }
}

.readiness-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.readiness-item {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.readiness-item > span {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 30px;
    font-weight: 800;
    height: 30px;
    justify-content: center;
}

.readiness-item.is-ready > span {
    background: #dff3df;
    color: #28622e;
}

.readiness-item.needs-attention > span {
    background: #fff0d4;
    color: #8a5700;
}

.readiness-item small,
.admin-table small {
    display: block;
    margin-top: 3px;
}

.table-scroll {
    overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: var(--muted);
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.status-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: .8rem;
    font-weight: 700;
    padding: 3px 9px;
}

.status-succeeded {
    background: #dff3df;
    color: #28622e;
}

.status-failed {
    background: #fde2df;
    color: #8b3028;
}

.status-processing,
.status-ignored {
    background: #edf0f5;
    color: #4e5868;
}

.empty-state.compact {
    padding: 22px;
}


@media print {
    @page {
        margin: 0;
        size: 62mm auto;
    }

    :root {
        --ink: #000;
        --line: #000;
    }

    body {
        background: #fff;
        color: #000;
        margin: 0;
    }

    .site-header,
    .no-print {
        display: none !important;
    }

    .page {
        margin: 0;
        max-width: none;
        padding: 0;
    }

    .detail-panel {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: 3mm;
    }

    .print-label {
        align-items: center;
        display: grid;
        gap: 2mm;
        justify-items: center;
        width: 54mm;
    }

    .print-label h1 {
        font-size: 12pt;
        margin: 0;
        max-width: 54mm;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .qr-label {
        border: 1mm solid #fff;
        box-shadow: inset 0 0 0 .2mm #000;
        max-width: none;
        width: 40mm;
    }

    .qr-label canvas,
    .qr-label img {
        max-width: none;
        width: 100%;
    }

    .label-url {
        font-size: 7pt;
        line-height: 1.2;
        margin: 0;
        max-width: 54mm;
        text-align: center;
    }

    .label-url a {
        color: #000;
        text-decoration: none;
    }
}
