* {
    box-sizing: border-box
}

:root {
    --p: #66191f;
    --pd: #4a1116;
    --bg: #f5f5f5;
    --tx: rgba(0, 0, 0, .87);
    --ts: rgba(0, 0, 0, .6);
    --dv: rgba(0, 0, 0, .12);
    --err: #d32f2f;
    --e1: 0 2px 1px -1px rgba(0, 0, 0, .2), 0 1px 1px 0 rgba(0, 0, 0, .14), 0 1px 3px 0 rgba(0, 0, 0, .12);
    --e4: 0 2px 4px -1px rgba(0, 0, 0, .2), 0 4px 5px 0 rgba(0, 0, 0, .14), 0 1px 10px 0 rgba(0, 0, 0, .12);
    --e24: 0 11px 15px -7px rgba(0, 0, 0, .2), 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12)
}

body {
    margin: 0;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--tx);
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: .01em
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--p);
    color: #fff;
    box-shadow: var(--e4);
    min-height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap
}

.brand {
    background: #fff;
    border-radius: 4px;
    padding: 4px 10px;
    display: flex
}

.brand img {
    height: 40px;
    display: block
}

nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap
}

nav a {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: .06em;
    padding: 0 16px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    transition: .2s
}

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

nav a.on {
    color: #fff;
    border-bottom-color: #fff
}

nav a#logout {
    height: 36px;
    margin-left: 12px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 4px;
    border-bottom-width: 1px;
    color: #fff
}

main {
    max-width: 1000px;
    margin: 24px auto;
    padding: 0 16px
}

.card {
    background: #fff;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--e1)
}

.card h3 {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: .0075em
}

.card h2 {
    margin: 0 0 4px;
    font-weight: 500;
    font-size: 24px
}

input,
select {
    font: inherit;
    padding: 10px 14px;
    margin: 4px 8px 4px 0;
    border: 1px solid rgba(0, 0, 0, .23);
    border-radius: 4px;
    background: #fff;
    color: var(--tx);
    transition: .15s;
    max-width: 100%
}

input:hover,
select:hover {
    border-color: var(--tx)
}

input:focus,
select:focus {
    outline: 0;
    border-color: var(--p);
    box-shadow: inset 0 0 0 1px var(--p)
}

button,
.btn {
    font: inherit;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 13px;
    background: var(--p);
    color: #fff;
    border: 1px solid transparent;
    min-height: 36px;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, .2), 0 2px 2px 0 rgba(0, 0, 0, .14), 0 1px 5px 0 rgba(0, 0, 0, .12);
    transition: .2s;
    vertical-align: middle
}

button:hover,
.btn:hover {
    background: var(--pd);
    box-shadow: var(--e4)
}

button:disabled {
    opacity: .5;
    cursor: wait
}

button.red {
    background: transparent;
    color: var(--err);
    border-color: rgba(211, 47, 47, .5);
    box-shadow: none
}

button.red:hover {
    background: rgba(211, 47, 47, .06)
}

button.txt {
    background: transparent;
    color: var(--p);
    border-color: rgba(102, 25, 31, .5);
    box-shadow: none
}

button.txt:hover {
    background: rgba(102, 25, 31, .06)
}

button.grey {
    background: transparent;
    color: var(--p);
    box-shadow: none
}

button.grey:hover {
    background: rgba(102, 25, 31, .06)
}

td button,
td .btn {
    min-height: 30px;
    padding: 3px 10px;
    font-size: 12px
}

td {
    white-space: nowrap
}

.ic {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: none;
    vertical-align: middle
}

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

th {
    color: var(--ts);
    font-weight: 500;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--dv);
    font-size: 13px
}

td {
    padding: 8px 16px;
    border-bottom: 1px solid var(--dv);
    font-size: 14px
}

td:last-child,
th:last-child {
    text-align: right
}

tr:last-child td {
    border-bottom: 0
}

tbody tr:hover td,
tr:hover td {
    background: rgba(0, 0, 0, .03)
}

td .ic {
    margin-right: 10px;
    fill: var(--ts)
}

td .crumb .ic {
    fill: var(--p)
}

.muted {
    color: var(--ts);
    font-size: 13px
}

.crumb {
    margin-bottom: 16px;
    font-size: 14px
}

.crumb a,
a.crumb {
    color: var(--p);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500
}

.crumb a:hover {
    text-decoration: underline
}

table a.crumb {
    margin: 0;
    display: inline-flex;
    align-items: center
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    z-index: 20
}

.modal.hidden {
    display: none
}

.modal .card {
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    margin: 0;
    box-shadow: var(--e24)
}

label.chk {
    display: block;
    padding: 8px 4px;
    border-radius: 4px;
    cursor: pointer
}

label.chk:hover {
    background: rgba(0, 0, 0, .04)
}

label.chk input {
    margin-right: 10px
}

.bar {
    background: rgba(102, 25, 31, .2);
    height: 6px;
    border-radius: 3px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    width: 0;
    background: var(--p);
    transition: width .25s
}

body.auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(var(--p) 0, var(--p) 240px, var(--bg) 240px)
}

.auth-box {
    width: 100%;
    max-width: 420px
}

.login {
    padding: 40px 32px 32px;
    box-shadow: var(--e24);
    margin: 0
}

.login img.lg {
    width: 100%;
    display: block;
    margin: 0 0 24px
}

.login p {
    color: var(--ts);
    margin: 0 0 16px
}

.login input {
    display: block;
    width: 100%;
    margin: 16px 0 0;
    padding: 14px
}

.login button {
    width: 100%;
    justify-content: center;
    margin-top: 24px;
    min-height: 44px;
    font-size: 14px
}

.foot {
    text-align: center;
    color: var(--ts);
    font-size: 12px;
    margin-top: 16px
}

@media(max-width:700px) {
    header {
        padding: 8px 12px
    }

    nav a {
        height: 48px;
        padding: 0 10px
    }

    td {
        white-space: normal
    }
}