:root {
    --navy: #0b1f4a;
    --orange: #ee6a2c;
    --bg: #f4f6f9;
    --line: #e4e7ec;
    --muted: #667085;
    --green: #16866f
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: #182230;
    font: 15px Arial, sans-serif
}

.shell {
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: 100vh
}

aside {
    background: var(--navy);
    color: white;
    padding: 28px 20px
}

aside h2 {
    margin: 0 8px 35px
}

aside h2 span {
    color: var(--orange)
}

nav a {
    display: block;
    color: #cad3e2;
    text-decoration: none;
    padding: 13px;
    border-radius: 8px;
    margin: 3px 0
}

nav a:hover {
    background: var(--orange);
    color: white
}

main>header {
    height: 72px;
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 30px
}

header small {
    display: block;
    color: var(--muted)
}

.content {
    padding: 28px
}

.metrics,
.grid,
.actions {
    display: grid;
    gap: 16px
}

.metrics {
    grid-template-columns: repeat(4, 1fr)
}

.grid {
    grid-template-columns: 1.4fr .8fr;
    margin-top: 16px
}

.actions {
    grid-template-columns: repeat(5, 1fr)
}

.card,
.metric {
    background: white;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 20px
}

.metric strong {
    display: block;
    font-size: 28px;
    margin: 8px 0
}

.metric small,
.muted {
    color: var(--muted)
}

.chart {
    height: 220px;
    display: flex;
    align-items: end;
    gap: 10px;
    border-bottom: 1px solid var(--line)
}

.bar {
    flex: 1;
    background: var(--orange);
    border-radius: 5px 5px 0 0;
    position: relative
}

.bar span {
    position: absolute;
    bottom: -24px;
    width: 100%;
    text-align: center;
    font-size: 11px;
    color: var(--muted)
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white
}

th,
td {
    text-align: left;
    padding: 13px;
    border-bottom: 1px solid var(--line)
}

th {
    font-size: 12px;
    color: var(--muted)
}

input,
select,
textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    margin-top: 5px
}

label {
    display: block;
    margin: 12px 0;
    font-weight: bold
}

button,
.button {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    background: var(--orange);
    color: white;
    padding: 11px 16px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer
}

.danger {
    background: #b42318
}

.secondary {
    background: var(--navy)
}

.row {
    display: flex;
    gap: 10px;
    align-items: center
}

.between {
    justify-content: space-between;
    margin-bottom: 18px
}

.notice {
    padding: 12px;
    background: #e9f7f2;
    color: var(--green);
    border-radius: 8px;
    margin-bottom: 15px
}

.alert {
    padding: 12px;
    background: #fff0ed;
    color: #b42318;
    border-radius: 8px
}

.auth {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: var(--navy)
}

.auth-card {
    width: min(420px, calc(100% - 30px));
    padding: 32px;
    background: white;
    border-radius: 14px
}

.auth-card button {
    width: 100%;
    margin: 12px 0
}

.menu-toggle {
    display: none
}

.status {
    color: var(--green);
    font-weight: bold
}

@media(max-width:950px) {
    .metrics {
        grid-template-columns: repeat(2, 1fr)
    }

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

    .actions {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:700px) {
    .shell {
        display: block
    }

    aside {
        display: none;
        position: fixed;
        inset: 0 20% 0 0;
        z-index: 4
    }

    aside.open {
        display: block
    }

    .menu-toggle {
        display: block;
        margin-right: auto
    }

    .content {
        padding: 18px
    }

    .metrics,
    .actions {
        grid-template-columns: 1fr
    }

    .table {
        overflow: auto
    }
}

.admin-brand {
    display: block;
    margin: 0 auto 30px;
    text-align: center
}

.admin-brand img {
    width: 96px;
    height: 88px;
    object-fit: contain
}

.auth-logo {
    display: block;
    width: 104px;
    height: 96px;
    object-fit: contain;
    margin: 0 auto 10px
}

.password-field {
    display: flex;
    align-items: center;
    gap: 8px
}

.password-field input {
    flex: 1
}

.password-field button {
    width: auto;
    margin: 5px 0 0;
    padding: 10px 12px;
    background: var(--navy)
}

.auth-links {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px
}

.auth-links a {
    font-size: 13px
}

nav a.active {
    background: var(--orange);
    color: #fff
}

.cms-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0
}

.cms-tabs a {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    text-decoration: none;
    font-weight: 700
}

.cms-tabs a.active {
    border-color: var(--orange);
    background: var(--orange);
    color: #fff
}

.editor-form {
    margin-bottom: 18px
}

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

.filter-form {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    align-items: end;
    gap: 12px;
    margin-bottom: 18px
}

.filter-form label {
    margin: 0
}

.action-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 330px
}

.action-cell form {
    display: inline
}

.action-cell button,
.action-cell .button {
    padding: 8px 10px;
    font-size: 12px
}

.status-pill {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-weight: 700
}

.status-pill.published {
    background: #e9f7f2;
    color: #16866f
}

.status-pill.draft {
    background: #fff3e8;
    color: #a94b18
}

.status-pill.archived {
    background: #f2f4f7;
    color: #667085
}

@media(max-width:700px) {

    .form-grid,
    .filter-form {
        grid-template-columns: 1fr
    }

    .action-cell {
        min-width: 270px
    }
}

.qr-preview {
    width: 104px;
    min-height: 104px;
    display: grid;
    place-items: center;
    padding: 6px;
    margin-bottom: 7px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px
}

.qr-preview img,
.qr-preview canvas {
    max-width: 92px;
    height: auto
}

.qr-download {
    padding: 7px 10px;
    font-size: 12px
}

.inline-form {
    display: inline
}

.status-pill.active {
    background: #e9f7f2;
    color: #16866f
}

.status-pill.inactive {
    background: #fff3e8;
    color: #a94b18
}

.status-pill.replaced {
    background: #f2f4f7;
    color: #667085
}

.user-editor {
    margin: 18px 0 24px
}

.form-grid.three {
    grid-template-columns: repeat(3, 1fr)
}

.form-section-title {
    margin: 24px 0 4px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em
}

.span-2 {
    grid-column: span 2
}

.span-3 {
    grid-column: 1/-1
}

.priority {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700
}

.priority.low {
    background: #eef2f6;
    color: #526174
}

.priority.medium {
    background: #fff3e8;
    color: #a94b18
}

.priority.high {
    background: #ffe4dc;
    color: #b42318
}

.priority.urgent {
    background: #b42318;
    color: #fff
}

.status-pill.assigned {
    background: #eef2ff;
    color: #334e9e
}

.status-pill.in_progress {
    background: #fff3e8;
    color: #a94b18
}

.status-pill.completed {
    background: #e9f7f2;
    color: #16866f
}

.status-pill.on_hold {
    background: #f2f4f7;
    color: #667085
}

.assignment-grid {
    display: grid;
    gap: 16px
}

@media(max-width:950px) {
    .form-grid.three {
        grid-template-columns: repeat(2, 1fr)
    }

    .span-3 {
        grid-column: 1/-1
    }
}

@media(max-width:700px) {
    .form-grid.three {
        grid-template-columns: 1fr
    }

    .span-2,
    .span-3 {
        grid-column: auto
    }
}

.content-title-cell {
    min-width: 280px
}

.cms-thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    float: left;
    margin-right: 12px;
    border: 1px solid var(--line)
}

.qr-export-panel {
    width: 220px
}

.print-format {
    margin: 7px 0
}

.qr-export-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px
}

.qr-export-buttons button {
    padding: 7px 5px;
    font-size: 11px
}

@media(max-width:700px) {
    .qr-export-panel {
        width: 190px
    }

    .qr-export-buttons {
        grid-template-columns: repeat(2, 1fr)
    }
}

.destination-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.destination-header-actions .button {
    margin: 0;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .destination-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .destination-header-actions {
        width: 100%;
    }

    .destination-header-actions .button {
        flex: 1;
        text-align: center;
    }
}