:root {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #172033;
    background: #f3f6fa;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f3f6fa; }
button, input, textarea { font: inherit; }
.topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: white;
    border-bottom: 1px solid #dfe5ed;
    position: sticky;
    top: 0;
    z-index: 5;
}
.topbar strong { font-size: 19px; margin-right: 12px; }
.topbar span { color: #6e7b8f; font-size: 14px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.top-actions form { margin: 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 30px 20px 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
h1 { margin: 0 0 6px; font-size: 28px; }
.page-heading p { margin: 0; color: #6e7b8f; }
.counter {
    min-width: 48px; height: 48px; border-radius: 16px;
    display: grid; place-items: center; background: #2787f5;
    color: white; font-weight: 700; font-size: 20px;
}
.post-list { display: grid; gap: 20px; }
.post-card {
    background: white; border: 1px solid #dfe5ed; border-radius: 18px;
    padding: 22px; box-shadow: 0 8px 24px rgba(25, 42, 70, .05);
}
.post-meta { color: #6e7b8f; font-size: 13px; margin-bottom: 14px; }
.field-label { display: block; font-weight: 650; margin: 0 0 9px; }
textarea, input[type=password] {
    width: 100%; border: 1px solid #cdd6e1; border-radius: 12px;
    background: #fbfcfe; padding: 13px 14px; outline: none;
}
textarea:focus, input[type=password]:focus { border-color: #2787f5; box-shadow: 0 0 0 3px rgba(39,135,245,.12); }
.attachments { margin-top: 18px; }
.attachment-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.attachment-card {
    border: 1px solid #dfe5ed; border-radius: 14px; padding: 10px;
    background: #f8fafc; display: flex; flex-direction: column; gap: 8px;
}
.attachment-card img {
    width: 100%; height: 145px; object-fit: cover; border-radius: 10px; background: #e8edf4;
}
.attachment-placeholder {
    height: 145px; display: grid; place-items: center; border-radius: 10px;
    background: #e8edf4; color: #6e7b8f; text-transform: uppercase; font-weight: 700;
}
.attachment-title { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.checkbox-row { color: #4d5c70; font-size: 14px; }
.warning { color: #ad6800; font-size: 12px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
button, .button {
    border: 0; border-radius: 10px; padding: 10px 16px;
    text-decoration: none; cursor: pointer; display: inline-flex; align-items: center;
    justify-content: center; font-weight: 650;
}
.primary { background: #2787f5; color: white; }
.danger { background: #e64646; color: white; }
.secondary { background: #e8edf4; color: #263548; }
.ghost { background: transparent; color: #4d5c70; }
.alert { padding: 14px 16px; border-radius: 12px; margin-bottom: 18px; }
.alert.error { background: #fff0f0; color: #a92e2e; border: 1px solid #f2c6c6; }
.alert.success { background: #ebfaef; color: #216b38; border: 1px solid #bee6c9; }
.empty {
    background: white; border: 1px dashed #c9d3df; border-radius: 18px;
    padding: 55px 20px; text-align: center; color: #6e7b8f;
}
.empty h2 { color: #172033; margin-top: 0; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
    width: min(420px, 100%); background: white; border: 1px solid #dfe5ed;
    border-radius: 20px; padding: 30px; box-shadow: 0 18px 50px rgba(25,42,70,.1);
}
.brand { color: #2787f5; font-weight: 800; margin-bottom: 18px; }
.login-card h1 { margin-bottom: 8px; }
.login-card p { color: #6e7b8f; margin: 0 0 20px; }
.login-card form { display: grid; gap: 12px; }
@media (max-width: 650px) {
    .topbar { padding: 12px 16px; }
    .topbar span { display: none; }
    .container { padding: 22px 12px 45px; }
    .post-card { padding: 15px; border-radius: 14px; }
    .page-heading { align-items: flex-start; gap: 15px; }
    h1 { font-size: 23px; }
}
