.admin-body { min-height: 100vh; }
.admin-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.admin-header .title { font-size: 15px; font-weight: 600; }
.admin-header .title em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 8px; }
.actions { display: flex; gap: 8px; }
.topbtn {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 7px 14px;
  font-size: 12px;
  text-decoration: none;
  border-radius: 2px;
}
.topbtn:hover { background: var(--panel); }
.admin-main { max-width: 1100px; margin: 0 auto; padding: 40px 32px 80px; }
.login-box {
  max-width: 380px;
  margin: 80px auto;
  padding: 40px 32px;
  background: var(--panel);
  border: 1px solid #e0dcd0;
  border-radius: 4px;
}
.login-box h1 { font-size: 20px; margin-bottom: 24px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 2px;
  margin-bottom: 12px;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--ink); }
textarea { min-height: 100px; line-height: 1.65; resize: vertical; }
label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; margin-top: 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 32px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tab { padding: 12px 20px; background: transparent; border: none; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }
.country-selector { margin-bottom: 24px; padding: 14px 18px; background: var(--panel); border: 1px solid #e0dcd0; border-radius: 4px; display: flex; gap: 14px; align-items: center; }
.country-selector label { margin: 0; font-size: 13px; color: #555; }
.country-selector select { width: auto; margin-bottom: 0; min-width: 200px; }
.item-card { background: var(--panel); padding: 20px 24px; border: 1px solid #e0dcd0; border-radius: 4px; margin-bottom: 14px; }
.item-card h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.item-card .meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.item-card .preview { font-size: 13px; color: #666; max-height: 60px; overflow: hidden; }
.item-card .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.add-section { padding: 20px 24px; background: var(--white); border: 1px dashed #c0bca8; border-radius: 4px; margin-bottom: 24px; }
.add-section h4 { font-size: 14px; margin-bottom: 12px; color: #555; }
.edit-form { padding: 24px; background: var(--white); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 24px; }
.edit-form h4 { font-size: 14px; margin-bottom: 16px; color: #555; font-weight: 600; }
.lang-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.lang-tab { padding: 6px 14px; background: transparent; border: 1px solid var(--line); border-radius: 2px 2px 0 0; font-size: 12px; color: var(--muted); }
.lang-tab.active { background: var(--panel); color: var(--ink); border-bottom-color: var(--panel); }
.editor-toolbar { display: flex; gap: 4px; padding: 8px; border: 1px solid var(--line); border-bottom: none; background: var(--panel); border-radius: 2px 2px 0 0; flex-wrap: wrap; }
.editor-toolbar button { background: transparent; border: 1px solid transparent; padding: 4px 10px; cursor: pointer; font-size: 13px; border-radius: 2px; }
.editor-toolbar button:hover { background: var(--white); border-color: var(--line); }
.editor-toolbar .divider { width: 1px; background: var(--line); margin: 0 4px; }
.editor { min-height: 200px; padding: 14px; border: 1px solid var(--line); background: var(--white); border-radius: 0 0 2px 2px; outline: none; font-size: 14px; line-height: 1.65; margin-bottom: 12px; max-height: 500px; overflow-y: auto; }
.editor img { max-width: 100%; border-radius: 4px; margin: 8px 0; }
.editor p { margin-bottom: 10px; }
.fb-card { background: var(--panel); padding: 16px 20px; border: 1px solid #e0dcd0; border-radius: 4px; margin-bottom: 12px; }
.fb-card.unread { border-left: 3px solid var(--accent); }
.fb-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fb-msg { font-size: 14px; white-space: pre-wrap; line-height: 1.6; }
.fb-actions { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.admin-note { background: #fff9e8; border: 1px solid #ead99b; padding: 14px 16px; border-radius: 4px; font-size: 13px; margin-bottom: 16px; }

.chatbot-form textarea { min-height: 120px; }
.chatbot-form textarea#faq_text { min-height: 190px; }
.chatbot-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chatbot-preview { margin-top: 18px; padding: 18px; background: #f6f3ea; border: 1px solid #e0dcd0; border-radius: 4px; }
.chatbot-preview h4 { margin-bottom: 10px; }
.chatbot-preview pre { white-space: pre-wrap; word-break: break-word; font-size: 12px; line-height: 1.65; color: #333; }
.hidden { display: none !important; }

.inline-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: #444;
  margin: 18px 0 4px;
}
.inline-check input { width: auto; margin: 0; }
.chatbot-form label em {
  font-style: normal;
  font-size: 11px;
  color: #9a7a28;
  margin-left: 4px;
}
.chatbot-status {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #d6c27c;
  background: #fff7d6;
  color: #5a4700;
  font-size: 13px;
  border-radius: 4px;
}
.translation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.translation-grid section {
  border: 1px solid #e0dcd0;
  border-radius: 4px;
  background: #fff;
  padding: 12px;
}
.translation-grid h5 {
  margin-bottom: 8px;
  font-size: 13px;
  color: #555;
}
