/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #faf9f7;
  color: #1a1a1a;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #1a1a1a; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 10;
}
nav {
  max-width: 760px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px;
}
.logo { font-size: 1.1rem; font-weight: bold; color: #1a1a1a; }
.logo:hover { text-decoration: none; }
.nav-links { display: flex; gap: 20px; font-size: 0.9rem; font-family: sans-serif; }

/* Main */
main {
  max-width: 760px; width: 100%;
  margin: 0 auto; padding: 40px 24px;
  flex: 1;
}

/* Flash */
.flash {
  background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
  padding: 12px 16px; border-radius: 6px; margin-bottom: 24px;
  font-family: sans-serif; font-size: 0.9rem;
}

/* Page header */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px; padding-bottom: 16px;
  border-bottom: 2px solid #1a1a1a;
}
.page-header h1 { font-size: 1.6rem; }

/* Post list */
.post-list { display: flex; flex-direction: column; gap: 32px; }
.post-card {
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 0;
  border-radius: 4px;
  transition: background 0.2s;
  cursor: pointer;
}
.post-card:last-child { border-bottom: none; }
.post-card:hover { background: none; }
.post-card:hover .post-preview { color: #e87c2b; }
.post-date { font-size: 0.8rem; color: #6b7280; font-family: sans-serif; }
.post-card h2 { font-size: 1.4rem; margin: 6px 0 10px; }
.post-card h2 a { color: #1a1a1a; }
.post-card h2 a:hover { color: #1a1a1a; text-decoration: none; }
.post-preview { color: #4b5563; margin-bottom: 12px; }
.read-more { font-family: sans-serif; font-size: 0.85rem; font-weight: 600; }

/* Post full */
.post-full { max-width: 680px; }
.post-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; font-family: sans-serif; font-size: 0.85rem;
}
.back { color: #6b7280; }
.post-date { color: #6b7280; }
.post-full h1 { font-size: 2rem; margin-bottom: 24px; line-height: 1.3; }
.post-body p { margin-bottom: 16px; font-size: 1.05rem; color: #374151; }
.post-actions {
  display: flex; gap: 10px; margin-top: 40px;
  padding-top: 24px; border-top: 1px solid #e5e7eb;
}

/* Admin table */
.admin-table {
  width: 100%; border-collapse: collapse;
  font-family: sans-serif; font-size: 0.9rem;
}
.admin-table th {
  text-align: left; padding: 10px 12px;
  border-bottom: 2px solid #1a1a1a;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #e5e7eb; }
.admin-table tr:hover td { background: #f9fafb; }
.date-col { color: #6b7280; white-space: nowrap; width: 140px; }
.actions-col { width: 100px; }

/* Auth & edit forms */
.auth-box, .edit-box {
  max-width: 480px; margin: 0 auto;
}
.auth-box h1, .edit-box h1 {
  font-size: 1.6rem; margin-bottom: 28px;
  padding-bottom: 16px; border-bottom: 2px solid #1a1a1a;
}
form label {
  display: block; margin-bottom: 18px;
  font-family: sans-serif; font-size: 0.85rem;
  font-weight: 600; color: #374151;
}
form input[type=text], form input[type=password], form textarea {
  display: block; width: 100%;
  padding: 10px 12px; margin-top: 6px;
  border: 1px solid #d1d5db; border-radius: 4px;
  font-size: 1rem; font-family: Georgia, serif;
  background: #fff; transition: border-color 0.15s;
  outline: none;
}
form input:focus, form textarea:focus { border-color: #2563eb; }
form textarea { resize: vertical; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; }

/* Buttons */
.btn {
  display: inline-block;
  background: #1a1a1a; color: #fff;
  padding: 9px 20px; border: none; border-radius: 4px;
  font-family: sans-serif; font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
  text-decoration: none;
}
.btn:hover { background: #2563eb; text-decoration: none; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost {
  background: transparent; color: #6b7280;
  border: 1px solid #d1d5db;
}
.btn-ghost:hover { background: #f3f4f6; color: #1a1a1a; }

/* Empty */
.empty { text-align: center; padding: 60px 0; color: #6b7280; font-family: sans-serif; }
.empty p { margin-bottom: 16px; }

/* Footer */
footer {
  text-align: center; padding: 24px;
  font-family: sans-serif; font-size: 0.8rem; color: #9ca3af;
  border-top: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 600px) {
  main { padding: 24px 16px; }
  .post-full h1 { font-size: 1.5rem; }
}
/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 20px; margin-top: 40px; padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  font-family: sans-serif;
}
.page-btn {
  color: #1a1a1a; font-size: 0.9rem; font-weight: 600;
}
.page-btn:hover { text-decoration: underline; }
.page-info { color: #6b7280; font-size: 0.85rem; }
