* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f6f7fb;
    color: #222;
    line-height: 1.55;
}

a {
    color: #3b4dff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 24px;
}

.container.small {
    max-width: 520px;
}

.card {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.06);
    margin-bottom: 22px;
}

.hero h1,
.topbar h1,
.detail-card h1 {
    margin-top: 0;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

@media (max-width: 860px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.entry-card {
    background: #fafbff;
    border: 1px solid #e9ecf7;
    border-radius: 16px;
    padding: 18px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.92rem;
    color: #666;
    margin-bottom: 10px;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e8edff;
    color: #2337c6;
    font-weight: bold;
}

.btn {
    display: inline-block;
    border: 0;
    background: #3b4dff;
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.92;
    text-decoration: none;
}

.btn.secondary {
    background: #e9ecf7;
    color: #233;
}

.btn.danger {
    background: #c73535;
}

.btn.small {
    font-size: 0.9rem;
    padding: 8px 10px;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

label {
    display: block;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid #ccd2e0;
    border-radius: 12px;
    font: inherit;
    background: #fff;
}

.search-form {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.search-form input {
    flex: 1;
    min-width: 260px;
}

.editor-box {
    min-height: 180px;
    background: #fff;
    border-radius: 12px;
}

.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border-color: #ccd2e0 !important;
}

.ql-container {
    min-height: 160px;
    font-size: 16px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #edf0f5;
}

.plain-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.plain-list li {
    padding: 10px 0;
    border-bottom: 1px solid #edf0f5;
}

.list-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.align-start {
    align-items: flex-start;
}

.alert.error {
    color: #b00020;
    font-weight: bold;
}

.rich-content strong {
    font-weight: 700;
}

.rich-content em {
    font-style: italic;
}

.rich-content p {
    margin-top: 0;
}

.entry-preview {
    max-height: 140px;
    overflow: hidden;
}

.content-block {
    margin-top: 24px;
}