:root {
    --blue: #0086be;
    --green: #6fb056;
    --yellow: #e99a01;
    --ink: #23374a;
    --muted: #687783;
    --paper: #f7f8f6;
    --line: #dfe5e8;
    --white: #fff
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Arial, "Helvetica Neue", sans-serif;
    background: #e2f7ff;
    color: var(--ink);
    line-height: 1.5
}

a {
    color: var(--green);
}

.wrap {
    max-width: 1080px;
    margin: auto;
    padding: 0 20px
}

.top {
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 8px #0000000a
}

.topbar {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink)
}

.brand img {
    width: 150px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center
}

.brand strong {
    display: block;
    font-size: 1.12rem
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: .88rem
}

.adminlink {
    text-decoration: none;
    font-weight: 700
}

.hero {
    margin: 28px 0 18px;
    background: #fff;
    border-radius: 18px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 18px #0000000b;
    border-top: 5px solid var(--green)
}

.hero h1 {
    font-size: 2.2rem;
    margin: .1em 0
}

.hero p {
    margin: .35em 0;
    color: var(--muted)
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .76rem;
    font-weight: 800;
    color: var(--blue) !important
}

.accent-dots {
    display: flex;
    gap: 10px
}

.accent-dots i {
    display: block;
    width: 24px;
    height: 24px;
    background: var(--green)
}

.accent-dots i:nth-child(2) {
    background: var(--yellow)
}

.accent-dots i:nth-child(3) {
    background: var(--blue)
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0
}

.filters input {
    flex: 1;
    min-width: 220px
}

.filters input,
.filters select,
input,
textarea,
select {
    padding: 11px 12px;
    border: 1px solid #cdd7dc;
    border-radius: 9px;
    background: #fff;
    font: inherit
}

.reset {
    align-self: center
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0 34px
}

.card,
.panel {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 3px 16px #0000000b;
    border: 1px solid #edf0f1
}

.card {
    overflow: hidden
}

.card img,
.placeholder {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover
}

.placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #e6f6fc, #e9f7ee);
    font-size: 3rem;
    color: var(--blue)
}

.card-body {
    padding: 19px
}

.card h2 {
    font-size: 1.22rem;
    margin: .3rem 0
}

.meta {
    font-size: .84rem;
    color: var(--green);
    font-weight: 700
}

.badge {
    display: inline-block;
    background: #fff7d8;
    color: #6d5811;
    padding: 5px 9px;
    border-radius: 7px;
    font-size: .85rem
}

.button,
.bigbutton,
button {
    display: inline-block;
    border: 0;
    border-radius: 9px;
    background: var(--green);
    color: #fff;
    padding: 10px 15px;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-weight: 700
}

.button:hover,
.bigbutton:hover {
    filter: brightness(.95)
}

.secondary {
    background: #e9f9e8 !important;
    color: #106d18 !important
}

.yellow {
    background: var(--yellow) !important;
    color: #493c08 !important
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 26px 0
}

.bigbutton {
    padding: 14px 19px
}

.panel {
    padding: 24px;
    margin: 22px 0
}

.narrow {
    max-width: 680px;
    padding-top: 28px
}

.narrow-wide {
    max-width: 860px;
    padding-top: 24px
}

.video-page {
    padding-top: 28px
}

.player {
    background: #000;
    border-radius: 14px;
    overflow: hidden
}

.player video {
    display: block;
    width: 100%;
    max-height: 78vh
}

.small {
    font-size: .87rem;
    color: var(--muted)
}

label {
    display: block;
    font-weight: 700;
    margin: 16px 0
}

label input,
label textarea,
label select {
    display: block;
    width: 100%;
    margin-top: 6px
}

small {
    display: block;
    font-weight: 400;
    color: var(--muted);
    margin-top: 5px
}

.error,
.success {
    padding: 12px 14px;
    border-radius: 9px;
    margin: 12px 0
}

.error {
    background: #ffe4e4;
    color: #8e1f1f
}

.success {
    background: #e2f5e8;
    color: #17683b
}

.admin-list {
    display: grid
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid var(--line)
}

.thumb {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f4;
    display: grid;
    place-items: center;
    color: var(--blue)
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.grow {
    flex: 1
}

.grow h3 {
    margin: 0 0 4px
}

.actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap
}

.smallbtn {
    padding: 7px 10px;
    font-size: .9rem
}

.qrbtn {
    background: var(--blue)
}

.inline {
    display: inline
}

.danger,
.linkdanger {
    background: none;
    color: #b42318;
    padding: 7px
}

.category-add,
.category-edit {
    display: flex;
    gap: 9px;
    align-items: center
}

.category-add input,
.category-edit input {
    flex: 1
}

.category-list {
    display: grid
}

.category-row {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 11px 0;
    border-top: 1px solid var(--line)
}

.category-edit {
    flex: 1
}

.center {
    text-align: center
}

.qrbox {
    background: #fff;
    padding: 10px;
    border-radius: 16px;
    display: inline-block;
    border: 3px solid var(--green)
}

.qr {
    display: block;
    width: min(430px, 80vw);
    height: auto
}

.urlbox {
    padding: 12px;
    border-radius: 8px;
    background: #f1f4f5;
    word-break: break-all;
    font-family: monospace;
    font-size: .9rem
}

.qr-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap
}

footer {
    margin-top: 45px;
    padding: 26px 0;
    background: var(--ink);
    color: #fff
}

footer .wrap {
    display: flex;
    justify-content: space-between;
    gap: 20px
}

footer a {
    color: #fff
}

@media(max-width:700px) {
    .topbar {
        min-height: 72px
    }

    .brand img {
        width: 110px
    }

    .brand>div {
        display: none
    }

    .hero {
        padding: 22px
    }

    .accent-dots {
        display: none
    }

    .filters>* {
        width: 100%
    }

    .admin-row {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .actions {
        width: 100%
    }

    .category-row,
    .category-add,
    .category-edit {
        align-items: stretch;
        flex-direction: column
    }

    .category-row form:last-child {
        align-self: flex-start
    }

    footer .wrap {
        flex-direction: column
    }
}

@media print {

    .top,
    .adminlink,
    .qr-actions,
    .small,
    footer {
        display: none !important
    }

    body {
        background: #fff
    }

    .panel {
        box-shadow: none;
        border: 0
    }

    .qr {
        width: 500px;
        max-width: 100%
    }

    .narrow {
        padding-top: 0
    }
}

.checklabel {
    display: block
}

.checklabel>input {
    display: inline-block;
    width: auto;
    margin-right: 8px
}

.checklabel small {
    margin-left: 28px
}

.settingrow {
    display: flex;
    gap: 8px;
    margin-top: 14px
}

.settingrow input {
    flex: 1
}

.subrow {
    border-top: 1px solid #e6ebf0;
    padding: 12px 0
}