:root {
    --bg: #1f2937;
    --surface-dark: #111827;
    --surface-mid: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --line-soft: #4b5563;

    /* Post-it inspired palette: visual approximations based on official Post-it color names/collections. */
    --postit-canary-yellow: #ffe66d;
    --postit-sunnyside: #ffd166;
    --postit-vital-orange: #ff9f43;
    --postit-candy-apple-red: #ff6b6b;
    --postit-power-pink: #ff8cc6;
    --postit-tropical-pink: #ff77a8;
    --postit-guava: #ffb199;
    --postit-acid-lime: #d8ff5f;
    --postit-limeade: #b8f26a;
    --postit-lucky-green: #7bd88f;
    --postit-aqua-splash: #73e0d3;
    --postit-blue-paradise: #6ec6ff;
    --postit-iris-infusion: #b8a1ff;
    --postit-washed-denim: #9db7d5;

    --postit-note-bg-1: var(--postit-canary-yellow);
    --postit-note-bg-2: var(--postit-sunnyside);
    --postit-note-bg-3: var(--postit-vital-orange);
    --postit-note-bg-4: var(--postit-guava);
    --postit-note-bg-5: var(--postit-power-pink);
    --postit-note-bg-6: var(--postit-limeade);
    --postit-note-bg-7: var(--postit-aqua-splash);
    --postit-note-bg-8: var(--postit-blue-paradise);
    --postit-note-bg-9: var(--postit-iris-infusion);
    --postit-note-bg-10: var(--postit-washed-denim);

    --postit-cyan: var(--postit-aqua-splash);
    --postit-lime: var(--postit-limeade);
    --postit-orange: var(--postit-vital-orange);
    --postit-purple: var(--postit-iris-infusion);
    --postit-red: var(--postit-candy-apple-red);
    --postit-yellow: var(--postit-canary-yellow);

    --admin-gallery: var(--postit-limeade);
    --admin-health: var(--postit-lucky-green);
    --admin-vet-events: var(--postit-power-pink);
    --admin-vet-parser: var(--postit-blue-paradise);
    --admin-vet-facilities: var(--postit-aqua-splash);
    --admin-vet-doctors: var(--postit-limeade);
    --admin-data: var(--postit-candy-apple-red);
    --admin-youtube: var(--postit-blue-paradise);
    --admin-postit: var(--postit-canary-yellow);
    --admin-emoji: var(--postit-tropical-pink);

    --heading-font: "Block Marys", "Avenir Next Condensed", "Avenir Next", "Arial Narrow", Inter, "Segoe UI", sans-serif;
    --body-font: Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--body-font);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.4;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

a:hover { color: #bfdbfe; }

h1, h2, h3 {
    margin-top: 0;
    line-height: 1.2;
    font-family: var(--heading-font);
    letter-spacing: 0.03em;
}

p { margin: 0 0 0.7rem; }

.site-header {
    background: #111827;
    border-bottom: 1px solid var(--line-soft);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 16px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
}

.brand-logo {
    width: clamp(150px, 20vw, 220px);
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    color: #111827;
    border: 2px solid rgba(0, 0, 0, 0.35);
    padding: 8px 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 900;
}

.nav-link:hover,
.nav-link.is-active {
    transform: translateY(-1px);
    filter: brightness(0.95);
}

.logs-widget-settings {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.logs-widget-settings .inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-home { background: var(--postit-aqua-splash); }
.nav-gallery { background: var(--postit-limeade); }
.nav-logs { background: var(--postit-vital-orange); }
.nav-charts { background: var(--postit-iris-infusion); }
.nav-link.is-active {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.app-main {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 16px 36px;
}

.home-motto {
    margin: 0 0 2px auto;
    padding: 0;
    border: none;
    background: transparent;
    color: #f3f4f6;
    font-family: "Avenir Next Condensed", "Avenir Next", "Arial Narrow", var(--body-font);
    letter-spacing: 0.11em;
    font-size: clamp(0.8rem, 1.3vw, 1rem);
    text-transform: uppercase;
    line-height: 1.1;
    text-align: right;
    width: 100%;
}

.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: flex-start;
}

.news-card {
    --postit-safe-gap: 24px;
    --postit-paper-bleed: 0px;
    --postit-color: var(--postit-note-bg-1);
    position: relative;
    border: none;
    border-radius: 0;
    box-shadow: none;
    color: #0f172a;
    width: var(--postit-size, 240px);
    height: var(--postit-size, 240px);
    flex: 0 0 auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
    transform-origin: center center;
    overflow: visible;
}

.news-card-paper {
    position: absolute;
    inset: calc(-1 * var(--postit-paper-bleed));
    background: var(--postit-color);
    z-index: 1;
}

.news-card-safe {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
    height: 100%;
    min-height: 100%;
    padding: var(--postit-safe-gap);
    background: transparent;
    overflow: visible;
}

.news-card-top {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 8px;
    align-items: start;
}

.news-card-logo {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-card-head {
    width: 100%;
    height: 100%;
    opacity: 0.3;
    filter: grayscale(1) brightness(0);
    pointer-events: none;
}

.news-card-title-wrap h3 {
    margin: 0;
    font-size: 0.74rem;
    font-family: var(--heading-font);
    font-weight: 800;
    text-transform: uppercase;
    text-align: right;
    line-height: 1.15;
}

.news-card-main {
    min-height: 0;
    overflow: visible;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.news-card-body {
    margin: 0;
    color: rgba(15, 23, 42, 0.88);
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: pre-line;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-card-media {
    margin: 0;
    border: none;
    background: transparent;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.news-card-media img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: var(--media-max-height, 180px);
    object-fit: contain;
    display: block;
    background: transparent;
}

.news-link {
    display: inline;
    margin-top: 0;
    padding: 0;
    border: none;
    color: #111827;
    background: transparent;
    font-size: 0.72rem;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.news-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    min-height: 12px;
}

.news-card-date {
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin: 0;
    text-align: right;
}

.postit-color-canary-yellow { --postit-color: var(--postit-canary-yellow); }
.postit-color-sunnyside { --postit-color: var(--postit-sunnyside); }
.postit-color-vital-orange { --postit-color: var(--postit-vital-orange); }
.postit-color-candy-apple-red { --postit-color: var(--postit-candy-apple-red); }
.postit-color-power-pink { --postit-color: var(--postit-power-pink); }
.postit-color-tropical-pink { --postit-color: var(--postit-tropical-pink); }
.postit-color-guava { --postit-color: var(--postit-guava); }
.postit-color-acid-lime { --postit-color: var(--postit-acid-lime); }
.postit-color-limeade { --postit-color: var(--postit-limeade); }
.postit-color-lucky-green { --postit-color: var(--postit-lucky-green); }
.postit-color-aqua-splash { --postit-color: var(--postit-aqua-splash); }
.postit-color-blue-paradise { --postit-color: var(--postit-blue-paradise); }
.postit-color-iris-infusion { --postit-color: var(--postit-iris-infusion); }
.postit-color-washed-denim { --postit-color: var(--postit-washed-denim); }
.postit-cyan { --postit-color: var(--postit-aqua-splash); }
.postit-lime { --postit-color: var(--postit-limeade); }
.postit-orange { --postit-color: var(--postit-vital-orange); }
.postit-purple { --postit-color: var(--postit-iris-infusion); }
.postit-red { --postit-color: var(--postit-candy-apple-red); }
.postit-yellow { --postit-color: var(--postit-canary-yellow); }

.postit-xs {
    --postit-safe-gap: 20px;
}

.postit-sm {
    --postit-safe-gap: 22px;
}

.postit-md {
    --postit-safe-gap: 24px;
}

.postit-tall {
    --postit-safe-gap: 24px;
}

.news-card:nth-child(8n + 1) {
    transform: translateY(-6px) rotate(-2.9deg);
}

.news-card:nth-child(8n + 2) {
    transform: translateY(4px) translateX(2px) rotate(2.4deg);
}

.news-card:nth-child(8n + 3) {
    transform: translateY(-2px) rotate(-1.7deg);
}

.news-card:nth-child(8n + 4) {
    transform: translateY(7px) translateX(-3px) rotate(1.1deg);
}

.news-card:nth-child(8n + 5) {
    transform: translateY(-8px) translateX(1px) rotate(2.8deg);
}

.news-card:nth-child(8n + 6) {
    transform: translateY(3px) rotate(-2.2deg);
}

.news-card:nth-child(8n + 7) {
    transform: translateY(-1px) translateX(-2px) rotate(0.8deg);
}

.news-card:nth-child(8n + 8) {
    transform: translateY(6px) translateX(3px) rotate(-1.3deg);
}

@media (max-width: 1100px) {
    .news-grid {
        gap: 24px;
    }
}

@media (max-width: 860px) {
    .news-grid {
        gap: 20px;
    }
}

.empty-posts,
.section-note,
.youtube-fallback,
.page-header,
form,
table,
.graf-page,
.yearcal-wrap,
.activity-controls {
    border-radius: 0;
}

.section-note {
    border: none;
    background: transparent;
    padding: 14px;
    margin: 22px 0 14px;
}

.section-note p { color: var(--text-secondary); }

.youtube-section { margin-top: 6px; }

.youtube-title {
    margin: 22px 0 14px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    align-items: start;
}

.video-card {
    position: relative;
    overflow: hidden;
    border: none;
    background: transparent;
    aspect-ratio: 16 / 9;
}

.video-card-link {
    display: block;
    width: 100%;
    height: 100%;
}

.video-thumb {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.video-thumb-empty {
    width: 100%;
    height: 100%;
    background: transparent;
}

.youtube-fallback {
    border: none;
    background: transparent;
    display: grid;
    grid-template-columns: minmax(120px, 220px) 1fr;
    gap: 12px;
    align-items: center;
}

.youtube-fallback-art {
    min-height: 140px;
    background: url('/static/branding/enid-head-dark.svg') center/contain no-repeat;
    opacity: 0.35;
}

.youtube-fallback-content p {
    color: var(--text-secondary);
    max-width: 640px;
}

.btn {
    display: inline-block;
    padding: 8px 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 800;
    border: 1px solid var(--line-soft);
    font-size: 0.79rem;
    background: #374151;
    color: #ffffff;
}

.btn:hover {
    background: #4b5563;
    color: #ffffff;
}

.page-header {
    border: 1px solid var(--line-soft);
    padding: 16px;
    margin-bottom: 14px;
    background: #111827;
}

.page-header h1,
.section-title,
#yearLabel,
.yearTitle {
    text-transform: uppercase;
}

.page-header p { color: var(--text-secondary); }

.warning-text,
.gallery-warning {
    margin: 12px 0;
    padding: 9px 11px;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.6);
    color: #fecaca;
}

form {
    background: #111827;
    padding: 10px;
    border: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 18px;
}

label {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.92rem;
}

input[type="text"], input[type="number"], select {
    background: #1f2937;
    color: var(--text-primary);
    border: 1px solid #6b7280;
    padding: 7px 9px;
    font-family: inherit;
}

button, input[type="submit"] {
    background: #374151;
    color: #ffffff;
    border: 1px solid #6b7280;
    padding: 7px 10px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.76rem;
}

button:hover, input[type="submit"]:hover { background: #4b5563; }

table {
    width: 100%;
    border-collapse: collapse;
    background: #111827;
    border: 1px solid var(--line-soft);
    overflow: hidden;
}

th, td {
    padding: 9px 11px;
    border-bottom: 1px solid rgba(107, 114, 128, 0.4);
}

th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #f3f4f6;
    background: #1f2937;
}

tr:hover td { background: rgba(75, 85, 99, 0.35); }

.compact-table { font-size: 0.9rem; }

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.gallery-card {
    position: relative;
    background: #111827;
    border: 1px solid #4b5563;
    overflow: hidden;
}

.gallery-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--gallery-strip, var(--postit-aqua-splash));
    z-index: 2;
}

.gallery-card::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -24px;
    width: 100px;
    height: 100px;
    background: var(--gallery-silhouette, url('/static/branding/enid-head-cyan.svg')) center/contain no-repeat;
    opacity: 0.24;
    pointer-events: none;
    z-index: 1;
}

.gallery-media-shell {
    margin: 10px;
    padding: 8px;
    border: 1px solid #6b7280;
    overflow: hidden;
    background: #1f2937;
}

.gallery-media-link,
.gallery-card a {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.gallery-card img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
}

.gallery-card-content {
    padding: 10px;
    position: relative;
    z-index: 2;
    background: #111827;
}

.gallery-card-content h3,
.gallery-card-content p {
    color: #f3f4f6;
}

.gallery-meta {
    margin: 0 0 7px;
    font-size: 0.78rem;
    color: #e5e7eb;
    display: inline-block;
    padding: 3px 7px;
    background: #1f2937;
    border: 1px solid #4b5563;
    font-weight: 700;
}

.gallery-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.gallery-tags span {
    background: #1f2937;
    color: #d1d5db;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #4b5563;
}

.gallery-card.accent-blue,
.gallery-detail-card.accent-blue { --gallery-strip: var(--postit-aqua-splash); --gallery-silhouette: url('/static/branding/enid-head-cyan.svg'); }
.gallery-card.accent-purple,
.gallery-detail-card.accent-purple { --gallery-strip: var(--postit-iris-infusion); --gallery-silhouette: url('/static/branding/enid-head-purple.svg'); }
.gallery-card.accent-green,
.gallery-detail-card.accent-green { --gallery-strip: var(--postit-limeade); --gallery-silhouette: url('/static/branding/enid-head-lime.svg'); }
.gallery-card.accent-apricot,
.gallery-detail-card.accent-apricot { --gallery-strip: var(--postit-vital-orange); --gallery-silhouette: url('/static/branding/enid-head-orange.svg'); }
.gallery-card.accent-pink,
.gallery-detail-card.accent-pink { --gallery-strip: var(--postit-power-pink); --gallery-silhouette: url('/static/branding/enid-head-red.svg'); }
.gallery-card.accent-yellow,
.gallery-detail-card.accent-yellow { --gallery-strip: var(--postit-canary-yellow); --gallery-silhouette: url('/static/branding/enid-head-yellow.svg'); }

.gallery-detail-card {
    position: relative;
    background: #111827;
    border: 1px solid #4b5563;
    overflow: hidden;
    max-width: 980px;
    margin: 0 auto;
}

.gallery-detail-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--gallery-strip, var(--postit-aqua-splash));
    z-index: 2;
}

.gallery-detail-card::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -24px;
    width: 140px;
    height: 140px;
    background: var(--gallery-silhouette, url('/static/branding/enid-head-cyan.svg')) center/contain no-repeat;
    opacity: 0.22;
    pointer-events: none;
    z-index: 1;
}

.gallery-detail-media-shell {
    margin: 12px;
    padding: 10px;
    border: 1px solid #6b7280;
    background: #1f2937;
    position: relative;
    z-index: 2;
}

.gallery-detail-image {
    display: block;
    width: 100%;
    max-height: 72vh;
    object-fit: contain;
    border: 1px solid rgba(156, 163, 175, 0.3);
    background: #0f172a;
}

.gallery-detail-content {
    padding: 12px;
    position: relative;
    z-index: 2;
    background: #111827;
}

.gallery-detail-content h2,
.gallery-detail-content p {
    color: #f3f4f6;
}

.gallery-detail-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.gallery-detail-back,
.gallery-detail-arrow {
    display: inline-block;
    color: #e5e7eb;
    border: 1px solid #6b7280;
    background: #1f2937;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gallery-detail-back:hover,
.gallery-detail-arrow:hover {
    background: #374151;
}

.gallery-detail-pager {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.graf-page,
.yearcal-wrap,
.activity-controls {
    background: #111827;
    border: 1px solid #4b5563;
    color: var(--text-primary);
}

.activity-controls button {
    background: #1f2937;
    border: 1px solid #6b7280;
    color: #e5e7eb;
}

.activity-item,
#drill-info { color: var(--text-secondary) !important; }

#myChart {
    margin-top: 14px;
    background: #111827;
    padding: 6px;
    max-width: 100%;
    border: 1px solid #4b5563;
}

@media (max-width: 720px) {
    .news-grid {
        gap: 16px;
    }

    .news-card {
        --postit-safe-gap: clamp(12px, 4vw, 18px);
        height: var(--postit-size, 240px);
        min-height: 0;
        aspect-ratio: 1 / 1;
    }

    .news-card-safe,
    .news-card-top,
    .news-card-title-wrap,
    .news-card-main,
    .news-card-media {
        min-width: 0;
        max-width: 100%;
    }

    .news-card-safe {
        height: 100%;
        min-height: 0;
        gap: 5px;
    }

    .news-card-top {
        grid-template-columns: 40px 1fr;
        gap: 6px;
    }

    .news-card-logo {
        width: 40px;
        height: 40px;
    }

    .news-card-title-wrap h3 {
        font-size: clamp(0.66rem, 2.8vw, 0.72rem);
        line-height: 1.1;
    }

    .news-card-main {
        gap: 5px;
    }

    .news-card-body {
        font-size: clamp(0.6rem, 2.55vw, 0.66rem);
        line-height: 1.14;
    }

    .news-card-media img {
        max-width: 100%;
        height: auto;
        max-height: min(var(--media-max-height, 120px), clamp(88px, 28vw, 120px));
    }

    .news-card-footer {
        min-height: 10px;
    }

    .news-card-date {
        font-size: 0.52rem;
    }

    .youtube-fallback { grid-template-columns: 1fr; }
    .youtube-fallback-art { min-height: 104px; }
}

.admin-body {
    background: var(--bg);
    color: var(--text-primary);
    font-size: 14px;
}

.admin-page {
    max-width: 980px;
    margin: 0 auto;
    padding: 18px 14px 28px;
}

.admin-header h1 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: 0.08em;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}

.admin-main-nav {
    gap: 10px;
    margin-bottom: 10px;
    max-width: 860px;
}

.admin-main-nav .admin-menu-link {
    box-sizing: border-box;
    flex: 1 1 180px;
    min-width: 180px;
    text-align: center;
}

.admin-section-nav {
    margin-top: 0;
}

.admin-nav-link {
    display: inline-block;
    color: #111827;
    border: 1px solid rgba(0, 0, 0, 0.35);
    padding: 4px 8px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.admin-nav-youtube { background: var(--admin-youtube); }
.admin-nav-postit { background: var(--admin-postit); }
.admin-nav-gallery { background: var(--admin-gallery); }
.admin-nav-health { background: var(--admin-health); }
.admin-nav-vet-events { background: var(--admin-vet-events); }
.admin-nav-vet-parser { background: var(--admin-vet-parser); }
.admin-nav-vet-facilities { background: var(--admin-vet-facilities); }
.admin-nav-vet-doctors { background: var(--admin-vet-doctors); }
.admin-nav-data { background: var(--admin-data); }
.admin-nav-emoji { background: var(--admin-emoji); }

.admin-nav-link.is-active,
.admin-menu-link.is-active {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85);
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

.admin-content {
    max-width: 960px;
}

.admin-messages,
.actions-list {
    margin: 0 0 16px;
    padding-left: 18px;
}

.admin-messages {
    padding: 9px 11px 9px 28px;
    border: 1px solid var(--line-soft);
    background: rgba(17, 24, 39, 0.72);
}

.admin-warning,
.admin-content .warning,
.admin-content p.error {
    margin: 0 0 16px;
    padding: 9px 11px;
    border: 1px solid rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

.admin-grid-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    max-width: 860px;
}

.admin-menu-link {
    display: inline-block;
    color: #111827;
    border: 1px solid rgba(0, 0, 0, 0.35);
    padding: 6px 10px;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.admin-section {
    margin-bottom: 24px;
    max-width: 960px;
}

.admin-section h2 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    line-height: 1.25;
}

.admin-section h3 {
    margin: 18px 0 8px;
    font-size: 0.95rem;
    line-height: 1.25;
}

.admin-section > .admin-section {
    margin: 16px 0 0;
}

.admin-section table {
    width: auto;
    min-width: 760px;
    max-width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.82rem;
}

.admin-section th,
.admin-section td {
    border: 1px solid var(--line-soft);
    padding: 6px;
    vertical-align: top;
}

.stack {
    display: grid;
    gap: 10px;
    max-width: 640px;
}

.admin-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 8px 0;
}

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

.admin-action-link,
.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
}

.admin-section label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-section .stack label {
    display: grid;
    gap: 4px;
}

.admin-section input[type="text"],
.admin-section input[type="date"],
.admin-section input[type="datetime-local"],
.admin-section select,
.admin-section textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 9px;
    border: 1px solid #6b7280;
    background: #1f2937;
    color: var(--text-primary);
    font: inherit;
}

.admin-section input[type="number"],
.admin-section input[type="file"] {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 6px;
    border: 1px solid #6b7280;
    background: #1f2937;
    color: var(--text-primary);
    font: inherit;
}

.admin-section input[type="checkbox"],
.admin-section input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--postit-blue-paradise);
    flex: 0 0 auto;
}

.admin-section .inline-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.admin-section button:not(.admin-nav-link):not(.admin-menu-link):not(.admin-action-btn) {
    background: #111827;
    color: #f9fafb;
    border: 1px solid #f9fafb;
    padding: 5px 9px;
    font-size: 0.78rem;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-section details {
    margin: 10px 0 16px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    background: rgba(17, 24, 39, 0.72);
}

.admin-section summary {
    color: var(--text-primary);
    font-family: var(--heading-font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    cursor: pointer;
}

.admin-section details[open] > summary {
    margin-bottom: 12px;
}

.admin-body :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--postit-blue-paradise);
    outline-offset: 2px;
}

.danger {
    color: #fecaca;
    border-color: #fecaca;
}

.status-pill {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid;
}

.status-enabled {
    background: #d9fbe4;
    color: #116329;
    border-color: #86efac;
}

.status-disabled {
    background: #fee2e2;
    color: #9f1239;
    border-color: #fca5a5;
}

.gallery-thumb {
    width: 86px;
    height: 86px;
    object-fit: cover;
}

.post-image-thumb {
    width: 96px;
    height: 74px;
    object-fit: cover;
    border: 1px solid var(--line-soft);
    display: block;
    margin-bottom: 4px;
}

.admin-logout {
    margin: 24px 0 0;
}

@media (max-width: 560px) {
    .vet-parser-dictionary-alias-form {
        grid-template-columns: 1fr;
    }
}

.emoji-mapping-new {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    align-items: end;
    margin: 10px 0 18px;
    padding: 10px;
    background: var(--surface-dark);
    border: 1px solid var(--line-soft);
}

.emoji-mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin: 10px 0 18px;
}

.emoji-mapping-grid-muted {
    opacity: 0.82;
}

.emoji-mapping-card {
    padding: 10px;
    background: var(--surface-dark);
    border: 1px solid var(--line-soft);
}

.emoji-mapping-card-muted {
    background: rgba(17, 24, 39, 0.68);
}

.emoji-mapping-card-form {
    display: grid;
    gap: 8px;
}

.emoji-mapping-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-secondary);
}

.emoji-mapping-card-head strong {
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.emoji-mapping-card-head span {
    white-space: nowrap;
    font-size: 0.78rem;
}

.emoji-mapping-section label {
    display: grid;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.emoji-mapping-section input[type="text"] {
    min-width: 0;
    width: 100%;
}

.emoji-mapping-actions,
.emoji-mapping-delete-form {
    display: flex;
    justify-content: flex-end;
}

.vet-parser-dictionary-new {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.vet-parser-dictionary-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.vet-parser-dictionary-card textarea {
    min-height: 52px;
}

.vet-parser-dictionary-aliases {
    display: grid;
    gap: 6px;
    margin-top: 4px;
}

.vet-parser-dictionary-alias-form {
    display: grid;
    grid-template-columns: minmax(95px, 1fr) minmax(78px, 0.55fr) auto auto;
    gap: 5px;
    align-items: end;
}

.vet-parser-dictionary-alias-form label {
    display: grid;
    gap: 3px;
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.vet-parser-dictionary-alias-form input[type="text"],
.vet-parser-dictionary-alias-form select {
    min-width: 0;
    width: 100%;
}

.vet-parser-dictionary-muted {
    opacity: 0.72;
}

.vet-parser-dictionary-small {
    color: var(--text-secondary);
    font-size: 0.74rem;
}

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

.logs-trend-card {
    background: #111827;
    border: 1px solid #4b5563;
    padding: 10px;
    min-height: 190px;
}

.logs-trend-card h3 {
    margin: 0 0 8px;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f3f4f6;
}

.logs-trend-card canvas {
    width: 100% !important;
    height: 130px !important;
}

@media (max-width: 760px) {
    .logs-trend-grid {
        grid-template-columns: 1fr;
    }
}

.vet-events-section table {
    min-width: 760px;
}

.vet-events-table small {
    color: var(--text-secondary);
}

.vet-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}


.directory-consistency {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid var(--line-soft);
    font-size: 0.74rem;
    font-weight: 700;
}

.directory-consistency-mismatch {
    background: #991b1b;
    border-color: #fecaca;
    color: #fef2f2;
}

.directory-consistency-consistent {
    background: #14532d;
    border-color: #bbf7d0;
    color: #dcfce7;
}

.directory-consistency-unknown,
.directory-consistency-not_applicable {
    background: #374151;
    color: #f9fafb;
}

.directory-confidence {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid var(--line-soft);
    font-size: 0.74rem;
    font-weight: 700;
}

.directory-confidence-exact {
    background: #14532d;
    border-color: #bbf7d0;
    color: #dcfce7;
}

.directory-confidence-tolerant {
    background: #1e3a8a;
    border-color: #bfdbfe;
    color: #dbeafe;
}

.directory-confidence-alias {
    background: #581c87;
    border-color: #e9d5ff;
    color: #f3e8ff;
}

.directory-confidence-inferred {
    background: #854d0e;
    border-color: #fde68a;
    color: #fef3c7;
}

.directory-confidence-low_confidence {
    background: #991b1b;
    border-color: #fecaca;
    color: #fef2f2;
}

.directory-confidence-not_applicable {
    background: #374151;
    color: #f9fafb;
}

.vet-detail-card {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--line-soft);
    background: rgba(17, 24, 39, 0.72);
}

.vet-detail-list {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
    gap: 5px 10px;
    margin: 0;
}

.vet-detail-list dt {
    font-weight: 700;
}

.vet-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.vet-detail-card details {
    margin-top: 8px;
}

.vet-detail-card pre {
    max-height: 420px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    border: 1px solid var(--line-soft);
    padding: 8px;
    background: #111827;
    color: #f9fafb;
}


.document-workflow-panel {
    border-color: #facc15;
    background: rgba(17, 24, 39, 0.9);
}

.document-workflow-panel h3 {
    margin-top: 0;
}

.document-workflow-actions {
    margin: 8px 0 10px;
}

.document-workflow-status {
    font-size: 0.82rem;
}

.workflow-status-done {
    background: #d9fbe4;
    color: #116329;
    border-color: #86efac;
}

.workflow-status-missing {
    background: #fee2e2;
    color: #9f1239;
    border-color: #fca5a5;
}

.workflow-status-low-confidence {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.workflow-status-failed {
    background: #991b1b;
    color: #fef2f2;
    border-color: #fecaca;
}

.health-document-summary {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 12px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    background: rgba(17, 24, 39, 0.96);
}
