* { box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; background: #f6f7f8; color: #222; font-size: 14px; }

/* Topbar */
.topbar { display: flex; gap: 10px; padding: 10px 20px; background: #1f2937; color: #fff; align-items: center; flex-wrap: wrap; }
.topbar a { color: #d1d5db; text-decoration: none; font-size: 13px; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.topbar .brand { font-weight: bold; font-size: 15px; color: #fff; margin-right: 12px; }
.topbar .spacer { flex: 1; }
.topbar span { color: #9ca3af; font-size: 13px; }

main { padding: 20px; max-width: 1300px; margin: 0 auto; }

/* Page header */
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-header h1 { margin: 0; }

h1 { font-size: 22px; margin-top: 0; }
h2 { font-size: 17px; margin-top: 24px; }
h3 { font-size: 15px; margin-top: 16px; }

/* Flash */
.flash { padding: 10px 14px; margin-bottom: 14px; border-radius: 4px; font-size: 13px; }
.flash-success { background: #d1fae5; color: #065f46; }
.flash-error   { background: #fee2e2; color: #991b1b; }
.flash-info    { background: #dbeafe; color: #1e40af; }
.flash-warning { background: #fef3c7; color: #92400e; }

/* Stats grid */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { background: #fff; padding: 14px 16px; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.07); }
.stat .num { font-size: 26px; font-weight: bold; line-height: 1.2; }
.stat .num a { color: inherit; text-decoration: none; }
.stat .lbl { color: #6b7280; font-size: 12px; margin-top: 2px; }

/* Table */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; vertical-align: middle; }
.table th { background: #f9fafb; font-weight: 600; color: #374151; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f9fafb; }

/* Card / info table */
.card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.06); margin-bottom: 16px; }
.info-table { border-collapse: collapse; }
.info-table th { text-align: left; padding: 5px 14px 5px 0; color: #6b7280; font-weight: 600; white-space: nowrap; }
.info-table td { padding: 5px 0; }

/* Forms */
form label { display: block; margin: 10px 0 4px; font-weight: 500; color: #374151; }
form input[type="text"], form input[type="password"], form input[type="number"],
form input[type="email"], form input[type="time"],
form textarea, form select {
  display: block; width: 100%; max-width: 560px;
  padding: 7px 10px; border: 1px solid #d1d5db;
  border-radius: 4px; font-size: 14px; background: #fff;
  transition: border-color .15s;
}
form input:focus, form textarea:focus, form select:focus {
  outline: none; border-color: #2563eb;
}
form input[type="checkbox"] { display: inline; width: auto; margin-right: 6px; }
form textarea { resize: vertical; }
form button, .btn {
  display: inline-block; padding: 7px 16px;
  background: #2563eb; color: #fff; border: none;
  border-radius: 4px; cursor: pointer; font-size: 14px;
  text-decoration: none; margin-top: 12px; margin-right: 6px;
}
form button:hover, .btn:hover { background: #1d4ed8; }
form button.danger, .danger { background: #dc2626; }
form button.danger:hover, .danger:hover { background: #b91c1c; }
.btn-warn { background: #d97706; color: #fff; display: inline-block; padding: 7px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; margin-top: 12px; }
.btn-sm { padding: 3px 8px; font-size: 12px; background: #2563eb; color: #fff; border-radius: 4px; text-decoration: none; }
.btn-sm:hover { background: #1d4ed8; }
.btn-link { background: none; border: none; cursor: pointer; font-size: 14px; padding: 0; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-published        { background: #d1fae5; color: #065f46; }
.badge-pending_moderation { background: #fef3c7; color: #92400e; }
.badge-failed           { background: #fee2e2; color: #991b1b; }
.badge-approved         { background: #dbeafe; color: #1e40af; }
.badge-draft            { background: #e5e7eb; color: #374151; }
.badge-queued           { background: #ede9fe; color: #5b21b6; }
.badge-rejected         { background: #fee2e2; color: #991b1b; }
.badge-missed           { background: #fef3c7; color: #92400e; }
.badge-superadmin       { background: #fef3c7; color: #92400e; }
.badge-admin            { background: #dbeafe; color: #1e40af; }
.badge-moderator        { background: #e5e7eb; color: #374151; }

/* Login */
.login-box { max-width: 380px; margin: 80px auto; background: #fff; padding: 32px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.login-box h1 { text-align: center; margin-bottom: 20px; }

/* Pre / code */
pre { background: #f3f4f6; padding: 12px; border-radius: 6px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
code { background: #f3f4f6; padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.content-box { white-space: pre-wrap; word-break: break-word; }

/* Pagination */
.pagination { margin-top: 14px; display: flex; align-items: center; gap: 12px; font-size: 13px; color: #6b7280; }
.pagination a { color: #2563eb; text-decoration: none; }
.pagination a:hover { text-decoration: underline; }

/* Filter form */
.filter-form { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.filter-form select, .filter-form input { max-width: 200px; margin-top: 0; }
.filter-form button, .filter-form a { margin-top: 0; }

/* Actions group */
.actions { display: flex; gap: 8px; align-items: center; margin: 12px 0; flex-wrap: wrap; }

/* Result box */
.result-box { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-top: 24px; }

/* Zodiac focus checkbox group */
.zodiac-focus { border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px 16px; margin: 14px 0; }
.zodiac-focus legend { font-weight: 600; padding: 0 6px; }
.zodiac-focus .hint { font-size: 12px; color: #6b7280; margin: 0 0 10px; }
.zodiac-all { display: inline-block; margin-bottom: 10px; font-weight: 500; }
.zodiac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px; }
.zodiac-grid label { display: flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.zodiac-grid input:disabled + * , .zodiac-grid label:has(input:disabled) { color: #9ca3af; }
