* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #fdf8f0; color: #333; line-height: 1.5; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: #c2185b; }

.top { background: linear-gradient(90deg, #ff7043, #ab47bc, #42a5f5); }
.top .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 12px 16px; }
.logo { color: #fff; font-size: 26px; font-weight: bold; text-decoration: none; }
nav a { color: #fff; margin-left: 14px; text-decoration: none; }
nav a:hover { text-decoration: underline; }

.greeting { color: #7b5e57; font-style: italic; }
.idea { background: #fff3c4; border-left: 6px solid #ffb300; padding: 12px 16px; border-radius: 8px; }
.idea a { margin-left: 8px; }

.card, .comment, .result { background: #fff; border-radius: 10px; padding: 12px 18px; margin: 12px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.card h2 { margin: 0 0 4px; font-size: 20px; }
.meta { color: #888; font-size: 14px; }
.pages b, .sort b { color: #c2185b; }
.text { background: #fff; padding: 16px 20px; border-radius: 10px; }

.form { display: flex; flex-direction: column; gap: 10px; max-width: 520px; margin: 16px 0; }
.form label { display: flex; flex-direction: column; font-weight: bold; }
input, select, textarea { font: inherit; padding: 8px; border: 1px solid #ccc; border-radius: 6px; margin-top: 4px; }
button, .button { background: #ab47bc; color: #fff; border: 0; border-radius: 6px; padding: 8px 16px;
    font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.danger { background: #e53935; padding: 4px 10px; }
.error { color: #c62828; font-weight: bold; }

.table { border-collapse: collapse; width: 100%; background: #fff; }
.table th, .table td { border: 1px solid #e0d6cc; padding: 8px; text-align: left; vertical-align: top; }
.actions { white-space: nowrap; }
.actions form { display: inline; margin-left: 8px; }

.bottom { text-align: center; color: #999; padding: 24px; margin-top: 30px; }

/* Кнопка «Выйти» выглядит как ссылка меню, но это POST-форма */
.logout { display: inline; margin-left: 14px; }
.logout button { background: none; border: 0; padding: 0; color: #fff; font: inherit; cursor: pointer; }
.logout button:hover { text-decoration: underline; }
