* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2937;
  background: #f5f7fb;
}
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.site-header, .site-footer { background: #0f172a; color: #fff; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; gap: 20px; }
.nav nav { display: flex; flex-wrap: wrap; gap: 14px; }
.nav a, .logo { color: #fff; font-weight: 600; }
.logo { font-size: 1.1rem; }
.hero, .card, .form-card, .event-card, .dashboard-card {
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  margin: 24px 0;
}
.hero h1 { margin-top: 0; font-size: 2.5rem; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
input, textarea, select, button {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
label { font-weight: 700; display: block; margin-top: 12px; }
button, .btn {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}
.btn-secondary { background: #334155; }
.btn-danger { background: #b91c1c; }
.btn[disabled], button[disabled] { opacity: 0.6; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.alert { padding: 14px 16px; border-radius: 12px; margin: 20px 0; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }
.meta { color: #64748b; font-size: 0.95rem; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
.table th, .table td { padding: 12px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.table th { background: #f8fafc; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; background: #e2e8f0; font-size: 0.8rem; font-weight: 700; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.yellow { background: #fef3c7; color: #92400e; }
.badge.red { background: #fee2e2; color: #991b1b; }
.pagination { display: flex; gap: 10px; margin: 18px 0 30px; }
img.avatar { width: 120px; height: 120px; object-fit: cover; border-radius: 999px; border: 4px solid #e2e8f0; }
.small { font-size: 0.9rem; color: #64748b; }
.code { background: #0f172a; color: #fff; padding: 14px; border-radius: 12px; overflow: auto; }
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .nav { flex-direction: column; align-items: flex-start; }
}


.footer-layout { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 0; }
.has-admin-toolbar { padding-top: 54px; }
.admin-toolbar { position:fixed; inset:0 0 auto 0; background:#111827; color:#fff; z-index:1000; box-shadow:0 4px 16px rgba(0,0,0,.15); }
.admin-toolbar-inner { min-height:46px; display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 0; }
.admin-toolbar a { color:#fff; background:#2563eb; padding:7px 10px; border-radius:10px; font-size:.92rem; }
.admin-toolbar-label { font-size:.9rem; font-weight:700; opacity:.85; margin-right:8px; }
.editor-shell { border:1px solid #cbd5e1; border-radius:16px; overflow:hidden; background:#fff; margin-top:10px; }
.editor-toolbar { display:flex; flex-wrap:wrap; gap:8px; padding:12px; background:#eff6ff; border-bottom:1px solid #dbeafe; }
.editor-toolbar button, .editor-toolbar .toolbar-label { width:auto; margin:0; padding:8px 10px; border-radius:10px; background:#fff; color:#1f2937; border:1px solid #cbd5e1; font-weight:700; }
.editor-toolbar .toolbar-label { background:#dbeafe; border-color:#bfdbfe; }
.editor-surface { min-height:220px; padding:16px; outline:none; }
.editor-surface img, .editor-inline-image { max-width:100%; height:auto; border-radius:12px; }
.editor-hidden { display:none; }
.editor-help { padding:12px 16px; border-top:1px solid #e2e8f0; background:#f8fafc; display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:center; }
.token-list, .media-grid { display:flex; gap:10px; flex-wrap:wrap; }
.media-card { width:140px; background:#fff; border:1px solid #e2e8f0; border-radius:14px; overflow:hidden; box-shadow:0 4px 12px rgba(0,0,0,.04); }
.media-card img { width:100%; height:92px; object-fit:cover; display:block; }
.media-card .media-meta { padding:10px; font-size:.85rem; }
.settings-grid { display:grid; grid-template-columns:1.1fr .9fr; gap:24px; align-items:start; }
.drop-note { font-size:.9rem; color:#64748b; }
.template-preview { background:#fff; border:1px dashed #cbd5e1; padding:16px; border-radius:16px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns:1fr; } .footer-layout { flex-direction:column; align-items:flex-start; } }


.compact-form { margin-bottom: 18px; }
.media-thumb { width: 110px; padding: 0; border: 1px solid #cbd5e1; border-radius: 14px; overflow: hidden; background: #fff; }
.media-thumb img { width: 100%; height: 90px; object-fit: cover; display: block; }
.editable-page-block { margin-top: 20px; }
.rich-content p:first-child { margin-top: 0; }
.rich-content p:last-child { margin-bottom: 0; }
