* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #152033;
    background: #f4f6f8;
    font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 232px;
    padding: 24px 18px;
    background: #11201b;
    color: #d6ece4;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 10px;
    background: #12b981;
    color: #fff;
    font-weight: 800;
}

.brand strong {
    display: block;
    color: #fff;
    font-size: 18px;
}

.brand small {
    color: #9bc4b6;
}

.nav {
    display: grid;
    gap: 6px;
}

.nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbe2da;
}

.nav a:hover,
.nav a.active {
    background: rgba(18, 185, 129, .16);
    color: #fff;
}

.main {
    margin-left: 232px;
    min-height: 100vh;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 34px;
    background: #fff;
    border-bottom: 1px solid #e7ecf0;
}

.topbar h1 {
    margin: 0;
    font-size: 24px;
}

.topbar p {
    margin: 4px 0 0;
    color: #667085;
}

.content {
    padding: 28px 34px 44px;
}

.panel {
    background: #fff;
    border: 1px solid #e7ecf0;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .04);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #e7ecf0;
}

.panel-head h2 {
    margin: 0;
    font-size: 18px;
}

.panel-body {
    padding: 20px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
    padding: 22px;
    background: #fff;
    border: 1px solid #e7ecf0;
    border-radius: 10px;
}

.stat strong {
    display: block;
    font-size: 30px;
}

.stat span {
    color: #667085;
}

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

.table th,
.table td {
    padding: 13px 14px;
    border-bottom: 1px solid #edf1f4;
    text-align: left;
    vertical-align: top;
}

.table th {
    color: #667085;
    font-weight: 600;
    background: #fbfcfd;
}

.table tr:last-child td {
    border-bottom: 0;
}

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

.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #10b981;
    color: #fff;
    cursor: pointer;
}

.btn.secondary,
button.secondary {
    background: #223449;
}

.btn.danger,
button.danger {
    background: #ef4444;
}

.ghost {
    background: #eef3f1;
    color: #174036;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 12px;
}

.badge.gray {
    background: #eef2f5;
    color: #667085;
}

.form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    color: #344054;
    font-weight: 600;
}

.field small {
    color: #798699;
}

.input,
.textarea,
.select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid #d9e0e7;
    border-radius: 8px;
    background: #fff;
    color: #152033;
    outline: none;
}

.textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #344054;
}

.cover-thumb {
    width: 72px;
    height: 96px;
    object-fit: cover;
    border: 1px solid #e7ecf0;
    border-radius: 8px;
    background: #f7f9fb;
}

.plain {
    display: grid;
    place-items: center;
    padding: 24px;
    background: #f1f5f4;
}

.login {
    width: min(420px, 100%);
    padding: 34px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(16, 24, 40, .12);
}

.login h1 {
    margin: 0 0 6px;
}

.login p {
    margin: 0 0 24px;
    color: #667085;
}

.alert {
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
}

.hint {
    color: #667085;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: auto;
    }

    .main {
        margin-left: 0;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .grid.cols-2,
    .grid.cols-4 {
        grid-template-columns: 1fr;
    }
}
