/* Admin Styles - Màu sắc tương tự trang chính */
:root {
  --admin-primary: #FF6B00;
  --admin-primary-dark: #E55D00;
  --admin-primary-light: #FF8533;
  --admin-secondary: #2C3E50;
  --admin-success: #27AE60;
  --admin-warning: #F39C12;
  --admin-danger: #E74C3C;
  --admin-info: #3498DB;
  --admin-bg: #F5F6FA;
  --admin-sidebar-bg: #FFFFFF;
  --admin-sidebar-hover: #F5F6FA;
  --admin-text: #2C3E50;
  --admin-text-light: #7F8C8D;
  --admin-border: #E0E0E0;
  --admin-white: #FFFFFF;
  --admin-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* =====================================================
   ADMIN LOGIN PAGE
   ===================================================== */
.admin-login-page {
  min-height: 100vh;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.admin-login-container {
  width: 100%;
  max-width: 450px;
}

.admin-login-box {
  background: var(--admin-white);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.admin-login-header {
  background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
  color: white;
  padding: 40px 30px;
  text-align: center;
}

.admin-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 20px;
  background: white;
  border-radius: 50%;
  padding: 10px;
}

.admin-login-header h1 {
  font-size: 28px;
  margin: 0 0 10px 0;
  font-weight: 700;
}

.admin-login-header p {
  font-size: 14px;
  opacity: 0.9;
  margin: 0;
}

.admin-login-form {
  padding: 40px 30px;
}

.admin-login-form .form-group {
  margin-bottom: 24px;
}

.admin-login-form label {
  display: block;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 8px;
  font-size: 14px;
}

.admin-login-form label i {
  margin-right: 8px;
  color: var(--admin-primary);
}

.admin-login-form input[type="text"],
.admin-login-form input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--admin-border);
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
}

.admin-login-form input:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.error-message {
  background: #FFEBEE;
  color: var(--admin-danger);
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  border-left: 4px solid var(--admin-danger);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.admin-login-footer {
  background: #F8F9FA;
  padding: 20px;
  text-align: center;
  color: var(--admin-text-light);
  font-size: 13px;
}

/* =====================================================
   ADMIN DASHBOARD LAYOUT
   ===================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--admin-bg);
}

/* Sidebar */
.admin-sidebar {
  width: 280px;
  background: var(--admin-sidebar-bg);
  color: var(--admin-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  transition: all 0.3s;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  border-right: 1px solid var(--admin-border);
}

.admin-sidebar.collapsed {
  width: 70px;
}

.admin-sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--admin-border);
  text-align: center;
  background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-dark) 100%);
}

.sidebar-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 12px;
  background: white;
  border-radius: 50%;
  padding: 8px;
}

.admin-sidebar-header h3 {
  font-size: 18px;
  margin: 0;
  font-weight: 700;
  color: white;
}

.admin-sidebar.collapsed .admin-sidebar-header h3,
.admin-sidebar.collapsed .nav-item span:not(.badge) {
  display: none;
}

/* Navigation */
.admin-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  color: var(--admin-text);
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
  position: relative;
  margin: 2px 12px;
  border-radius: 8px;
}

.nav-item:hover {
  background: var(--admin-sidebar-hover);
  color: var(--admin-primary);
}

.nav-item.active {
  background: var(--admin-primary);
  color: white;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  border-radius: 0 4px 4px 0;
}

.nav-item i {
  width: 24px;
  margin-right: 12px;
  font-size: 18px;
  flex-shrink: 0;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--admin-danger);
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Sidebar Footer */
.admin-sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--admin-border);
}

.admin-user-info {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--admin-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.user-avatar i {
  font-size: 24px;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.user-role {
  font-size: 12px;
  opacity: 0.7;
  text-transform: capitalize;
}

.btn-logout {
  width: 100%;
  padding: 10px;
  background: var(--admin-bg);
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.btn-logout:hover {
  background: var(--admin-danger);
  border-color: var(--admin-danger);
  color: white;
}

/* Main Content */
.admin-main {
  flex: 1;
  margin-left: 280px;
  transition: all 0.3s;
}

.admin-sidebar.collapsed + .admin-main {
  margin-left: 70px;
}

/* Header */
.admin-header {
  background: white;
  padding: 20px 30px;
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.admin-header-left h1 {
  font-size: 24px;
  margin: 0;
  color: var(--admin-text);
}

.btn-toggle-sidebar {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--admin-text);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s;
}

.btn-toggle-sidebar:hover {
  background: var(--admin-bg);
}

.admin-header-right {
  display: flex;
  gap: 12px;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--admin-bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  color: var(--admin-text);
  text-decoration: none;
}

.btn-icon:hover {
  background: var(--admin-primary);
  color: white;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--admin-danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

/* Content */
.admin-content {
  padding: 30px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--admin-shadow);
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
}

.stat-primary .stat-icon {
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
}

.stat-success .stat-icon {
  background: linear-gradient(135deg, #27AE60, #229954);
}

.stat-warning .stat-icon {
  background: linear-gradient(135deg, #F39C12, #E67E22);
}

.stat-info .stat-icon {
  background: linear-gradient(135deg, #3498DB, #2980B9);
}

.stat-details {
  flex: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--admin-text);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--admin-text-light);
  font-weight: 500;
}

/* Dashboard Section */
.dashboard-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--admin-shadow);
  margin-bottom: 24px;
}

.dashboard-section h2 {
  font-size: 20px;
  margin: 0 0 20px 0;
  color: var(--admin-text);
  font-weight: 700;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: 8px;
  background: var(--admin-bg);
  transition: all 0.3s;
}

.activity-item:hover {
  background: #E8EAF0;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.activity-success {
  background: var(--admin-success);
}

.activity-info {
  background: var(--admin-info);
}

.activity-warning {
  background: var(--admin-warning);
}

.activity-danger {
  background: var(--admin-danger);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 4px;
}

.activity-desc {
  font-size: 14px;
  color: var(--admin-text-light);
  margin-bottom: 4px;
}

.activity-time {
  font-size: 12px;
  color: var(--admin-text-light);
}

/* Content Header */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--admin-text-light);
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 45px;
  border: 2px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--admin-primary);
}

/* Buttons */
.btn-primary {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--admin-primary), var(--admin-primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
  padding: 12px 24px;
  background: var(--admin-bg);
  color: var(--admin-text);
  border: 2px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

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

.btn-icon-sm {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0 4px;
}

.btn-edit {
  background: var(--admin-info);
  color: white;
}

.btn-edit:hover {
  background: #2980B9;
}

.btn-delete {
  background: var(--admin-danger);
  color: white;
}

.btn-delete:hover {
  background: #C0392B;
}

/* Data Table */
.data-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--admin-bg);
}

.data-table th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  color: var(--admin-text);
  font-size: 14px;
  border-bottom: 2px solid var(--admin-border);
}

.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--admin-border);
  font-size: 14px;
  color: var(--admin-text);
}

.data-table tbody tr:hover {
  background: var(--admin-bg);
}

.table-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.text-center {
  text-align: center;
}

.badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.badge-success {
  background: #D5F5E3;
  color: var(--admin-success);
}

.badge-danger {
  background: #FADBD8;
  color: var(--admin-danger);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-lg {
  max-width: 1200px;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: var(--admin-text);
}

.btn-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--admin-bg);
  color: var(--admin-text);
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  background: var(--admin-danger);
  color: white;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--admin-border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  bottom: -2px;
}

.tab-btn:hover {
  color: var(--admin-primary);
  background: rgba(255, 107, 0, 0.05);
}

.tab-btn.active {
  color: var(--admin-primary);
  border-bottom-color: var(--admin-primary);
  font-weight: 600;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Two Column Layout for Forms */
.form-row-2cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-col-left,
.form-col-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (max-width: 768px) {
  .form-row-2cols {
    grid-template-columns: 1fr;
  }
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--admin-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Form */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--admin-text);
  margin-bottom: 8px;
  font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s;
  font-family: inherit;
  box-sizing: border-box;
}

.form-group select {
  height: auto;
  min-height: 48px;
  line-height: 1.5;
}

.form-group select option {
  padding: 8px 12px;
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--admin-primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ContentEditable Editor */
.content-editor {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 12px;
  min-height: 400px;
  background: white;
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
  transition: all 0.3s;
}

.content-editor:focus {
  outline: none;
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.content-editor:empty:before {
  content: 'Paste nội dung vào đây (text, ảnh, bảng...)\A\AHỗ trợ Markdown: [Tên link](https://url.com)';
  color: #999;
  white-space: pre-wrap;
}

.content-editor img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 10px 0;
  border-radius: 4px;
}

.content-editor table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}

.content-editor table td,
.content-editor table th {
  border: 1px solid #ddd;
  padding: 8px;
}

.content-editor table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.image-preview {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.image-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--admin-border);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
}

.tab-btn {
  padding: 10px 20px;
  background: white;
  border: 2px solid var(--admin-border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--admin-text);
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.tab-btn.active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: white;
}

/* Contact Detail */
.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
}

.detail-row label {
  font-weight: 600;
  color: var(--admin-text);
}

.detail-row a {
  color: var(--admin-primary);
  text-decoration: none;
}

.detail-row a:hover {
  text-decoration: underline;
}

.message-content {
  background: var(--admin-bg);
  padding: 16px;
  border-radius: 8px;
  line-height: 1.6;
}

.unread-row {
  background: #FFF9E6;
}

.text-truncate {
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-info {
  background: var(--admin-info);
  color: white;
}

.btn-info:hover {
  background: #2980B9;
}

.badge-warning {
  background: #FEF5E7;
  color: var(--admin-warning);
}

/* Settings Page */
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--admin-shadow);
}

.settings-section h2 {
  font-size: 18px;
  margin: 0 0 20px 0;
  color: var(--admin-text);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-section h2 i {
  color: var(--admin-primary);
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .content-header {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   CONTENT BUILDER
   ===================================================== */
.content-builder {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 15px;
  background: #f9f9f9;
}

#contentSections {
  margin-bottom: 15px;
}

.content-section {
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
}

.content-section:last-child {
  margin-bottom: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--admin-primary);
}

.section-header h4 {
  margin: 0;
  color: var(--admin-primary);
  font-size: 16px;
  font-weight: 600;
}

.content-section .form-group {
  margin-bottom: 15px;
}

.content-section .form-group:last-child {
  margin-bottom: 0;
}

.content-section label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--admin-text);
  font-size: 14px;
}

.content-section input[type="text"],
.content-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.content-section input[type="text"]:focus,
.content-section textarea:focus {
  outline: none;
  border-color: var(--admin-primary);
}

.content-section .image-preview {
  margin-top: 10px;
  min-height: 100px;
  border: 2px dashed var(--admin-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
}

.content-section .image-preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 6px;
}

.content-section .image-preview:empty::after {
  content: 'Chưa có ảnh';
  color: var(--admin-text-light);
  font-size: 14px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}


/* Markdown Toolbar */
.markdown-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid var(--admin-border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  margin-top: 8px;
}

.markdown-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.markdown-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6c757d;
}

.markdown-hint i {
  color: var(--admin-primary);
}

.markdown-toolbar-right {
  display: flex;
  gap: 8px;
}

.btn-markdown-help {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: white;
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-markdown-help:hover {
  background: #e9ecef;
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.btn-markdown-help i {
  font-size: 14px;
}

/* Markdown Help Modal */
.markdown-help-modal .modal-content {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.markdown-help h3 {
  margin: 0 0 20px 0;
  color: var(--admin-primary);
  font-size: 20px;
}

.markdown-help-section {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--admin-primary);
}

.markdown-help-section h4 {
  margin: 0 0 12px 0;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.markdown-help-section p {
  margin: 8px 0;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.markdown-help-section code {
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #d63384;
  border: 1px solid #dee2e6;
}

.markdown-help-section ol {
  margin: 12px 0;
  padding-left: 24px;
}

.markdown-help-section ol li {
  margin: 8px 0;
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

/* Adjust content-editor when toolbar is present */
.markdown-toolbar + .content-editor {
  border-radius: 0 0 8px 8px;
  margin-top: 0;
}

