* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #ffd7e7;
    color: #1f1720;
    font-family: Arial, Helvetica, sans-serif;
}

.topbar {
    align-items: center;
    background: #880e4f;
    color: #fff;
    display: flex;
    gap: 20px;
    height: 72px;
    justify-content: space-between;
    padding: 0 26px;
}

.brand {
    align-items: center;
    display: flex;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 700;
    gap: 18px;
}

.brand img {
    height: 46px;
    width: 46px;
}

.logout,
.button,
button {
    background: #fff;
    border: 0;
    border-radius: 6px;
    color: #880e4f;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    min-height: 38px;
    padding: 9px 16px;
    text-decoration: none;
}

button {
    background: #1f8f45;
    color: #fff;
}

button.danger {
    background: #b42336;
}

.button.secondary {
    background: #4d636d;
    color: #fff;
}

.app-shell {
    display: grid;
    grid-template-columns: 210px 1fr;
    min-height: calc(100vh - 72px);
}

.sidebar {
    background: #fff;
    border-right: 1px solid #ead1dc;
}

.sidebar-logo {
    display: block;
    height: 150px;
    margin: 0 auto;
    max-width: 100%;
    object-fit: contain;
}

.menu-title {
    background: #4d636d;
    color: #fff;
    font: 700 24px Georgia, 'Times New Roman', serif;
    padding: 10px 16px;
    text-align: center;
}

.nav-link {
    align-items: center;
    border-bottom: 1px solid #f0dde5;
    color: #880e4f;
    display: flex;
    font-size: 19px;
    font-weight: 700;
    gap: 12px;
    padding: 12px 14px;
    text-decoration: none;
}

.nav-link.active {
    background: #ffe9f2;
}

.nav-link.muted {
    opacity: .65;
}

.nav-link img {
    height: 28px;
    object-fit: contain;
    width: 28px;
}

.content {
    overflow: auto;
    padding: 24px;
}

.page-title {
    background: #4d636d;
    color: #fff;
    margin: -24px -24px 24px;
    padding: 14px 24px;
}

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

.page-title p {
    margin: 6px 0 0;
}

.stats-grid {
    display: grid;
    gap: 26px;
    grid-template-columns: repeat(2, minmax(230px, 280px));
    justify-content: center;
    padding-top: 10px;
}

.stat-card {
    align-items: center;
    background: #fff;
    border: 3px ridge #ddd;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 170px;
    padding: 16px;
}

.stat-card img {
    height: 64px;
    object-fit: contain;
}

.stat-card span {
    font: 700 22px Georgia, 'Times New Roman', serif;
}

.stat-card strong {
    font-size: 42px;
}

.toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-bottom: 18px;
}

input,
select,
textarea {
    background: #fffde1;
    border: 1px solid #cdb8c1;
    border-radius: 4px;
    font: inherit;
    min-height: 38px;
    padding: 8px 10px;
    width: 100%;
}

textarea {
    min-height: 86px;
    resize: vertical;
}

.toolbar input,
.toolbar select {
    max-width: 220px;
}

.table-wrap {
    background: #fff;
    border: 1px solid #ead1dc;
    margin-bottom: 24px;
    overflow: auto;
}

.table-wrap.compact {
    max-height: 380px;
}

table {
    border-collapse: collapse;
    min-width: 980px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid #eee1e7;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #fff3f8;
    color: #4a2135;
    font-size: 14px;
    white-space: nowrap;
}

.row-action {
    color: #880e4f;
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 14px 18px;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
}

.panel-form {
    display: grid;
    gap: 16px;
}

label {
    color: #2c2027;
    display: grid;
    font-weight: 700;
    gap: 6px;
}

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

.span-3 {
    grid-column: span 3;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
}

.two-column {
    display: grid;
    gap: 30px;
    grid-template-columns: minmax(280px, 430px) 1fr;
}

.inline-label {
    display: block;
}

.alert {
    border-radius: 6px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.alert.success {
    background: #dff8e8;
    color: #15542c;
}

.alert.error {
    background: #ffe1e6;
    color: #8a1024;
}

@media (max-width: 900px) {
    .app-shell,
    .two-column,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

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

