* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  background: #f5f5f5;
}

/* ── Login ──────────────────────────────────────────────────────────────────── */

.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-form {
  background: #fff;
  padding: 40px;
  border: 1px solid #e0e0e0;
  width: 100%;
  max-width: 380px;
}

.login-form h2 {
  margin-bottom: 24px;
  font-size: 20px;
}

/* ── Dashboard layout ───────────────────────────────────────────────────────── */

.dashboard-screen {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */

.menu-bar {
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.menu-brand {
  padding: 20px 16px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid #333;
  letter-spacing: 0.03em;
}

.menu-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.menu-link {
  padding: 12px 16px;
  color: #ccc;
  text-decoration: none;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.menu-link:hover,
.menu-link.active {
  background: #2d2d2d;
  color: #fff;
}

.menu-footer {
  padding: 16px;
  border-top: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#admin-email {
  font-size: 12px;
  color: #999;
  word-break: break-all;
}

/* ── Main content ───────────────────────────────────────────────────────────── */

.page-content {
  padding: 32px;
  max-width: 900px;
  width: 100%;
  min-width: 0;
}

/* Event-type row grid — keep description from overflowing the card */
.event-type-row {
  grid-template-columns: 60px 1fr 1fr 1fr auto !important;
  min-width: 0;
}

.panel {
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.panel-header h2 {
  font-size: 20px;
}

.panel-header h3 {
  font-size: 16px;
}

.panel-description {
  margin-bottom: 16px;
  color: #666;
  font-size: 13px;
}

/* ── Item list ──────────────────────────────────────────────────────────────── */

.item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 12px 16px;
}

.item-thumbnail {
  width: 56px;
  height: 56px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #eee;
}

.item-thumbnail-empty {
  background: #f0f0f0;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.item-info strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-meta {
  font-size: 12px;
  color: #888;
}

.item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.empty-state {
  color: #999;
  font-size: 13px;
  padding: 24px 0;
}

/* ── Badges ─────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 2px;
  font-weight: 500;
}

.badge-green { background: #e6f4ea; color: #1e7a3a; }
.badge-grey  { background: #f0f0f0; color: #666; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */

.form-wrapper {
  background: #fff;
  border: 1px solid #e8e8e8;
  padding: 24px;
  margin-top: 24px;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.form-wrapper h3 {
  font-size: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #444;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 8px 10px;
  border: 1px solid #d0d0d0;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  min-width: 0;
  width: 100%;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #1a1a1a;
}

.form-group small {
  font-size: 12px;
  color: #888;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.form-error {
  background: #fff0f0;
  border: 1px solid #ffcccc;
  color: #cc0000;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ── Image preview ──────────────────────────────────────────────────────────── */

.image-preview {
  margin-top: 8px;
}

.image-preview img {
  max-width: 200px;
  max-height: 120px;
  object-fit: cover;
  border: 1px solid #eee;
}

/* ── Inquiry details ────────────────────────────────────────────────────────── */

.inquiry-responses {
  margin-top: 8px;
  font-size: 12px;
}

.inquiry-responses pre {
  background: #f8f8f8;
  padding: 8px;
  border: 1px solid #eee;
  font-size: 11px;
  overflow-x: auto;
  margin-top: 6px;
}

details summary {
  cursor: pointer;
  font-size: 12px;
  color: #666;
  user-select: none;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */

.btn-primary {
  padding: 9px 18px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}

.btn-primary:hover { background: #333; }

.btn-secondary {
  padding: 9px 18px;
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #1a1a1a;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}

.btn-secondary:hover { background: #f5f5f5; }

.btn-danger {
  padding: 9px 18px;
  background: #fff;
  color: #cc0000;
  border: 1px solid #cc0000;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover { background: #fff0f0; }

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

#logout-btn {
  padding: 7px 12px;
  background: transparent;
  color: #ccc;
  border: 1px solid #444;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

#logout-btn:hover {
  color: #fff;
  border-color: #999;
}

/* ── Quill rich text editor ─────────────────────────────────────────────────── */

#blog-body-editor {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: none;
  min-height: 280px;
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ql-toolbar.ql-snow {
  border: 1px solid #e0e0e0;
  background: #fafafa;
  flex-wrap: wrap;
}

.ql-container.ql-snow {
  border: 1px solid #e0e0e0;
  border-top: none;
}

.ql-table-insert {
  font-size: 12px !important;
  width: auto !important;
  padding: 0 6px !important;
}

/* Tables inside the editor */
#blog-body-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
}

#blog-body-editor th,
#blog-body-editor td {
  border: 1px solid #ccc;
  padding: 6px 10px;
}
