*,
:after,
:before {
    box-sizing: border-box;
}

@font-face {
    font-family: "Quicksand";
    src: url(//cdn.unpkg.net/assets/font/quicksand.woff2) format("woff");
}

body {
    --th-primary: #333;
    margin: 0;
    font-family:
        Quicksand,
        -apple-system,
        BlinkMacSystemFont,
        "PingFang SC",
        "Microsoft YaHei",
        "Noto Sans CJK SC",
        Helvetica,
        Arial,
        sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

body.viewport {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fcfcfc;
    height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    opacity: 0.6;
    transition: all 0.3s;
    cursor: pointer;
}

a:hover {
    opacity: 1;
}

sup {
    color: red;
    margin-left: 3px;
}

img {
    display: block;
}

h1 {
    margin: 0;
    font-size: 80px;
    font-weight: 400;
    color: #ccc;
}

input,
select {
    font: inherit;
    outline: 0;
}

input[type="search"] {
    flex: 1;
    border: #ccc 1px solid;
    border-radius: 5px;
    width: 100%;
    height: 40px;
    padding: 10px;
}

aside {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 200px;
    background: #ddd;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
}

aside > a {
    opacity: 1;
}

aside .category a {
    display: block;
    position: relative;
    margin: 5px;
}

aside .category a:hover::before {
    content: "-";
    position: absolute;
    left: -15px;
}

main {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 200px;
}

main > div {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
}

main > div::-webkit-scrollbar {
    width: 10px;
}

main > div::-webkit-scrollbar-thumb {
    background: #ddd;
}

main > div::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

header {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 60px;
    background: #eee;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
}

footer {
    font-size: 13px;
    color: #999;
}

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

table th {
    text-align: left;
    padding: 0 8px;
}

table th,
table td {
    height: 40px;
    border: #eee 1px solid;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

table input,
table select {
    width: 100%;
    height: 100%;
    padding: 0 8px;
    border: 0;
    appearance: none;
    cursor: pointer;
    color: #666;
    background: #fcfcfc;
}

table input.active,
table select.active {
    color: #333;
    background: #fff;
}

table input.changed,
table select.changed {
    color: blue !important;
}

.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    padding: 30px 50px 45px;
    border-radius: 10px;
    box-shadow: 0 3px 30px 0 rgb(0 0 0 / 20%);
    gap: 20px;
}

.login-panel th-button {
    margin-top: 10px;
    width: 100%;
}

.login-panel th-button::part(button) {
    width: 100%;
}

.login-panel input {
    border: #ccc 1px solid;
    border-radius: 5px;
    width: 220px;
    height: 40px;
    padding: 10px;
}

.logo {
    width: 100px;
}

.icon {
    width: 24px;
    height: 24px;
}

.tinyicon {
    width: 16px;
    height: 16px;
}

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

.external-link {
    position: relative;
}

.external-link:hover a {
    opacity: 1;
}

.external-link a {
    position: absolute;
    right: 6px;
    bottom: 6px;
    top: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fcfcfc;
    padding: 0 3px;
    opacity: 0;
}

.external-link img {
    width: 20px;
    height: 20px;
}

.btn-text {
    margin-left: 5px;
}

.error {
    color: red;
}

@media (max-width: 720px) {
    aside {
        display: none;
    }
    main {
        left: 0;
    }
    .btn-text {
        display: none;
    }
}
