:root {
  --primary: #1a3a5c;
  --primary-light: #2c5f8a;
  --accent: #c0392b;
  --sidebar-w: 260px;
}

* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f0f4f8; margin: 0; }

/* Navbar */
.navbar-top {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.navbar-top .brand { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.navbar-top .brand .cross { font-size: 1.4rem; }
.navbar-top .nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.navbar-top .user-info { font-size: 0.85rem; opacity: 0.9; }
.btn-logout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* Sidebar */
.sidebar {
  position: fixed;
  top: 60px; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: white;
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  z-index: 100;
  padding-top: 16px;
}
.sidebar .nav-item { list-style: none; }
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  color: #4a5568;
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: all 0.2s;
}
.sidebar .nav-link:hover { background: #f0f4f8; color: var(--primary); }
.sidebar .nav-link.active {
  background: #e8f0fa;
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sidebar .nav-link i { font-size: 1.1rem; width: 22px; }
.sidebar-section {
  font-size: 0.72rem;
  font-weight: 700;
  color: #a0aec0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 16px 20px 6px;
}

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: 60px;
  padding: 24px;
  min-height: calc(100vh - 60px);
}

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Stats cards */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 4px solid;
}
.stat-card .stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.stat-card .stat-val { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { font-size: 0.82rem; color: #718096; margin-top: 2px; }

.stat-total { border-color: #2c5f8a; }
.stat-total .stat-icon { background: #e8f0fa; color: #2c5f8a; }
.stat-nam { border-color: #2980b9; }
.stat-nam .stat-icon { background: #ebf5fb; color: #2980b9; }
.stat-nu { border-color: #8e44ad; }
.stat-nu .stat-icon { background: #f4ecf7; color: #8e44ad; }
.stat-giaoxu { border-color: #27ae60; }
.stat-giaoxu .stat-icon { background: #eafaf1; color: #27ae60; }

/* Chart containers */
.chart-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.chart-card h6 { font-weight: 700; color: var(--primary); margin-bottom: 16px; font-size: 0.95rem; }

/* Filter bar */
.filter-bar {
  background: white;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.filter-bar .form-select, .filter-bar .form-control {
  font-size: 0.875rem;
  min-width: 150px;
}
.filter-bar label { font-size: 0.78rem; font-weight: 600; color: #4a5568; margin-bottom: 4px; display: block; }

/* Members table */
.table-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}
.table-card .table-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.table-card .table-header h6 { margin: 0; font-weight: 700; color: var(--primary); }
.members-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.members-table th {
  background: #f7fafc;
  color: #4a5568;
  font-weight: 600;
  padding: 12px 12px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.members-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #f0f4f8;
  vertical-align: middle;
}
.members-table tr:hover td { background: #f7fafc; }
.badge-nam { background: #ebf5fb; color: #2980b9; padding: 3px 8px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }
.badge-nu { background: #f4ecf7; color: #8e44ad; padding: 3px 8px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }
.badge-khoa { background: #e8f5e9; color: #2e7d32; padding: 3px 8px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }
.badge-gp { background: #fff3e0; color: #e65100; padding: 3px 8px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }

/* Action buttons */
.btn-action { border: none; background: none; cursor: pointer; padding: 4px 7px; border-radius: 5px; transition: background 0.15s; font-size: 0.9rem; }
.btn-action.view { color: #2c5f8a; }
.btn-action.view:hover { background: #e8f0fa; }
.btn-action.edit { color: #f39c12; }
.btn-action.edit:hover { background: #fef9e7; }
.btn-action.del { color: #e74c3c; }
.btn-action.del:hover { background: #fdecea; }

/* Pagination */
.pagination-bar {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #718096;
}
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  min-width: 32px; height: 32px;
  border: 1px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  color: #4a5568;
}
.page-btn:hover { background: #e8f0fa; border-color: #2c5f8a; color: #2c5f8a; }
.page-btn.active { background: #2c5f8a; border-color: #2c5f8a; color: white; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: white;
  border-radius: 16px;
  width: 700px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-box .modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border-radius: 16px 16px 0 0;
}
.modal-box .modal-head h5 { margin: 0; font-size: 1rem; font-weight: 700; }
.modal-close { background: rgba(255,255,255,0.2); border: none; color: white; border-radius: 6px; width: 30px; height: 30px; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: rgba(255,255,255,0.35); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 10px; }

/* Form */
.form-label { font-size: 0.82rem; font-weight: 600; color: #4a5568; margin-bottom: 4px; }
.form-control, .form-select { font-size: 0.875rem; }
.form-section-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; color: var(--primary); border-bottom: 2px solid #e8f0fa; padding-bottom: 6px; margin: 20px 0 12px; letter-spacing: 0.05em; }

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white; border: none; border-radius: 8px;
  padding: 8px 20px; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: opacity 0.2s;
}
.btn-primary-custom:hover { opacity: 0.9; }
.btn-secondary-custom {
  background: white; color: #4a5568; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 8px 20px; font-size: 0.875rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-secondary-custom:hover { background: #f7fafc; }
.btn-danger-custom {
  background: #e74c3c; color: white; border: none;
  border-radius: 8px; padding: 8px 20px; font-size: 0.875rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-success-custom {
  background: #27ae60; color: white; border: none;
  border-radius: 8px; padding: 8px 20px; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Toast */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast-msg {
  background: white; border-radius: 10px; padding: 12px 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex; align-items: center; gap: 10px;
  font-size: 0.875rem; min-width: 240px; max-width: 380px;
  animation: slideIn 0.3s ease;
  border-left: 4px solid;
}
.toast-msg.success { border-color: #27ae60; }
.toast-msg.error { border-color: #e74c3c; }
.toast-msg.info { border-color: #2c5f8a; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Detail view */
.detail-field { margin-bottom: 12px; }
.detail-field .label { font-size: 0.75rem; font-weight: 600; color: #a0aec0; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.detail-field .value { font-size: 0.9rem; color: #2d3748; }
.detail-name { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }

/* Export section */
.export-card {
  background: white; border-radius: 12px;
  padding: 28px; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.export-option {
  border: 2px solid #e2e8f0; border-radius: 12px; padding: 24px;
  text-align: center; transition: all 0.2s; cursor: pointer;
}
.export-option:hover { border-color: var(--primary-light); background: #f7fafc; }
.export-option .export-icon { font-size: 3rem; margin-bottom: 12px; }
.export-option h6 { font-weight: 700; margin-bottom: 6px; }
.export-option p { font-size: 0.82rem; color: #718096; margin: 0; }

/* User filter buttons */
.user-filter-btn {
  border: 1px solid #e2e8f0; background: white; border-radius: 8px;
  padding: 6px 14px; font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 6px; color: #4a5568;
}
.user-filter-btn:hover { background: #f7fafc; }
.user-filter-btn.active { background: #1a3a5c; color: white; border-color: #1a3a5c; }
.user-filter-btn.pending.active { background: #f59e0b; border-color: #f59e0b; }
.user-filter-btn.approved.active { background: #22c55e; border-color: #22c55e; }
.user-filter-btn.disabled.active { background: #ef4444; border-color: #ef4444; }
.user-count {
  background: rgba(255,255,255,0.25); border-radius: 10px;
  padding: 1px 7px; font-size: 0.75rem; font-weight: 700;
}
.user-filter-btn:not(.active) .user-count { background: #e2e8f0; color: #4a5568; }

/* Status badges */
.badge-status-pending  { background:#fff8e1; color:#b45309; padding:3px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; white-space:nowrap; }
.badge-status-approved { background:#dcfce7; color:#15803d; padding:3px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; white-space:nowrap; }
.badge-status-disabled { background:#fee2e2; color:#b91c1c; padding:3px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; white-space:nowrap; }
.badge-role-admin { background:#ede9fe; color:#6d28d9; padding:3px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; }
.badge-role-user  { background:#e0f2fe; color:#0369a1; padding:3px 10px; border-radius:20px; font-size:0.78rem; font-weight:600; }

/* Import wizard */
.import-step {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 20px; border-radius: 12px; border: 2px solid #e2e8f0;
  background: white; margin-bottom: 16px; transition: border-color 0.2s;
}
.import-step.active { border-color: #2c5f8a; }
.import-step.done { border-color: #22c55e; background: #f0fdf4; }
.step-num {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  background: #e2e8f0; color: #718096;
}
.import-step.active .step-num { background: #2c5f8a; color: white; }
.import-step.done .step-num { background: #22c55e; color: white; }
.step-title { font-weight: 700; font-size: 0.95rem; color: #2d3748; margin-bottom: 4px; }
.step-desc { font-size: 0.82rem; color: #718096; }

/* Drop zone */
.drop-zone {
  border: 2px dashed #cbd5e0; border-radius: 12px;
  padding: 36px 20px; text-align: center;
  cursor: pointer; transition: all 0.2s; background: #f7fafc;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: #2c5f8a; background: #e8f0fa;
}
.drop-zone .dz-icon { font-size: 2.8rem; margin-bottom: 10px; color: #a0aec0; }
.drop-zone.drag-over .dz-icon { color: #2c5f8a; }
.drop-zone p { margin: 0; color: #718096; font-size: 0.88rem; }
.drop-zone .dz-hint { font-size: 0.78rem; color: #a0aec0; margin-top: 6px; }

/* Import summary cards */
.import-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.imp-card {
  flex: 1; min-width: 100px; border-radius: 10px;
  padding: 12px 16px; text-align: center;
}
.imp-card .imp-val { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.imp-card .imp-lbl { font-size: 0.75rem; margin-top: 3px; }
.imp-new      { background: #dcfce7; color: #15803d; }
.imp-dup-ex   { background: #fff8e1; color: #92400e; }
.imp-dup-file { background: #fef2f2; color: #991b1b; }
.imp-error    { background: #fee2e2; color: #991b1b; }

/* Import preview table */
.import-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.import-table th {
  background: #f7fafc; padding: 9px 10px;
  text-align: left; border-bottom: 2px solid #e2e8f0;
  font-size: 0.75rem; font-weight: 700; color: #718096;
  text-transform: uppercase; white-space: nowrap;
}
.import-table td { padding: 8px 10px; border-bottom: 1px solid #f0f4f8; vertical-align: middle; }
.import-table tr.row-new td { }
.import-table tr.row-dup-existing td { background: #fffbeb; }
.import-table tr.row-dup-file td { background: #fef2f2; }
.import-table tr.row-error td { background: #fdf2f8; opacity: 0.7; }
.import-table tr.row-deselected td { opacity: 0.45; }

.dup-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; border-radius: 4px; padding: 2px 7px; font-weight: 600;
}
.dup-badge.new      { background: #dcfce7; color: #15803d; }
.dup-badge.dup-ex   { background: #fff3cd; color: #856404; }
.dup-badge.dup-file { background: #fee2e2; color: #b91c1c; }
.dup-badge.error    { background: #fce7f3; color: #9d174d; }

/* Mobile hamburger button */
.btn-hamburger {
  display: none;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 8px;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-right: 6px;
}
.btn-hamburger:hover { background: rgba(255,255,255,0.25); }

/* Sidebar overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* Mobile sidebar header */
.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.sidebar-mobile-header span { color: white; font-weight: 700; font-size: 0.95rem; }
.btn-sidebar-close {
  background: rgba(255,255,255,0.2);
  border: none; color: white;
  border-radius: 6px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
}
.btn-sidebar-close:hover { background: rgba(255,255,255,0.35); }

/* Bottom navigation (mobile) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid #e2e8f0;
  z-index: 200;
  height: 62px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.1);
}
.bottom-nav-items { display: flex; height: 100%; }
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #a0aec0;
  font-size: 0.6rem;
  gap: 3px;
  cursor: pointer;
  border: none;
  background: none;
  transition: color 0.15s;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.bottom-nav-item i { font-size: 1.3rem; line-height: 1; }
.bottom-nav-item span { font-weight: 500; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}
.bottom-nav-item.menu-btn { color: #718096; }
.bottom-nav-item.menu-btn:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 768px) {
  .btn-hamburger { display: flex; }
  .sidebar-mobile-header { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 100;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.18);
  }
  .main-content { margin-left: 0; padding-bottom: 76px; }
  .bottom-nav { display: block; }
  .navbar-top .user-info { display: none; }
  .toast-container { bottom: 76px; right: 12px; left: 12px; }
  .toast-msg { min-width: unset; max-width: unset; width: 100%; }
  .filter-bar { padding: 12px; gap: 8px; }
  .filter-bar > div { width: 100%; }
  .filter-bar .form-select,
  .filter-bar .form-control { min-width: unset; width: 100%; }
}

/* Loading */
.spinner-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(255,255,255,0.7); z-index: 5000;
  align-items: center; justify-content: center;
}
.spinner-overlay.show { display: flex; }

/* ── Professional Posts Management ────────────────────────────────── */
.posts-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.posts-stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px;}
.posts-stat{background:white;border-radius:12px;padding:18px 16px;text-align:center;cursor:pointer;border:2px solid transparent;transition:all .2s;box-shadow:0 2px 8px rgba(0,0,0,.06);}
.posts-stat:hover,.posts-stat.ps-active{border-color:var(--primary);background:#f0f6ff;}
.stat-num{display:block;font-size:1.9rem;font-weight:800;color:var(--primary);line-height:1.1;}
.stat-lbl{display:block;font-size:.73rem;color:#718096;margin-top:4px;font-weight:500;}
.post-thumb-cell{display:flex;gap:12px;align-items:flex-start;}
.post-thumb-wrap{width:64px;height:48px;border-radius:6px;overflow:hidden;background:linear-gradient(135deg,#1a3a5c,#2c5f8a);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.3);font-size:1.2rem;flex-shrink:0;}
.post-thumb-wrap img{width:100%;height:100%;object-fit:cover;}
.post-title-block .pt-title{font-weight:700;color:#1e293b;font-size:.88rem;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.post-title-block .pt-slug{font-size:.7rem;color:#94a3b8;font-family:monospace;margin-top:3px;}
.post-status-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:20px;font-size:.74rem;font-weight:700;cursor:pointer;transition:all .2s;border:none;letter-spacing:.02em;}
.post-status-published{background:#dcfce7;color:#15803d;}
.post-status-published:hover{background:#bbf7d0;box-shadow:0 2px 8px rgba(21,128,61,.2);}
.post-status-draft{background:#fef9c3;color:#b45309;}
.post-status-draft:hover{background:#fef08a;box-shadow:0 2px 8px rgba(180,83,9,.15);}

/* ── Editor ──────────────────────────────────────────────────────── */
.editor-topbar{display:flex;align-items:center;gap:12px;padding:0 0 16px;border-bottom:1px solid #e2e8f0;margin-bottom:22px;flex-wrap:wrap;}
.back-btn{display:flex;align-items:center;gap:6px;background:none;border:none;color:var(--primary);font-weight:600;font-size:.88rem;cursor:pointer;padding:7px 12px;border-radius:8px;transition:all .2s;}
.back-btn:hover{background:#f0f6ff;}
.save-status{flex:1;font-size:.78rem;color:#94a3b8;font-style:italic;text-align:center;}
.editor-actions{display:flex;gap:8px;flex-wrap:wrap;}
.editor-layout{display:grid;grid-template-columns:1fr 300px;gap:24px;align-items:flex-start;}
.editor-title-input{width:100%;border:none;border-bottom:2px solid #e2e8f0;padding:8px 0;font-size:1.5rem;font-weight:700;color:#1e293b;outline:none;background:transparent;transition:border-color .2s;display:block;margin-bottom:10px;}
.editor-title-input:focus{border-bottom-color:var(--primary);}
.editor-title-input::placeholder{color:#cbd5e1;font-weight:400;}
.slug-display-row{display:flex;align-items:center;gap:6px;margin-bottom:14px;background:#f8fafc;border-radius:6px;padding:6px 10px;min-height:32px;flex-wrap:wrap;}
.ql-toolbar.ql-snow{border-radius:8px 8px 0 0!important;background:#f8fafc!important;border-color:#e2e8f0!important;}
.ql-container.ql-snow{border-radius:0 0 8px 8px!important;border-color:#e2e8f0!important;min-height:400px;}
.ql-editor{min-height:380px;font-size:.92rem;line-height:1.8;color:#374151;font-family:'Be Vietnam Pro',sans-serif;}
.ql-editor.ql-blank::before{color:#cbd5e1;font-style:normal;}
.editor-sidebar-col{display:flex;flex-direction:column;gap:14px;}
.editor-card{background:white;border-radius:12px;padding:18px;box-shadow:0 2px 8px rgba(0,0,0,.06);border:1px solid #e2e8f0;}
.editor-card-title{font-size:.7rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em;color:#94a3b8;margin-bottom:14px;padding-bottom:8px;border-bottom:1px solid #f1f5f9;display:flex;align-items:center;}
.publish-info-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;font-size:.85rem;color:#4a5568;font-weight:500;}
.thumb-preview-box{width:100%;aspect-ratio:16/9;border-radius:8px;background:linear-gradient(135deg,#e2ecf7,#c5d8ed);display:flex;align-items:center;justify-content:center;overflow:hidden;}
.thumb-preview-box img{width:100%;height:100%;object-fit:cover;}

/* ── Settings ─────────────────────────────────────────────────────── */
.settings-layout{display:grid;grid-template-columns:210px 1fr;gap:20px;align-items:flex-start;}
.settings-nav{background:white;border-radius:12px;padding:8px;box-shadow:0 2px 8px rgba(0,0,0,.06);border:1px solid #e2e8f0;position:sticky;top:80px;}
.settings-nav-item{display:flex;align-items:center;gap:9px;padding:10px 12px;border-radius:8px;cursor:pointer;font-size:.85rem;font-weight:600;color:#64748b;transition:all .15s;user-select:none;}
.settings-nav-item:hover{background:#f0f6ff;color:var(--primary);}
.settings-nav-item.active{background:var(--primary);color:white;}
.settings-nav-item i{font-size:1rem;flex-shrink:0;}
.setting-card{background:white;border-radius:12px;padding:22px;margin-bottom:18px;box-shadow:0 2px 8px rgba(0,0,0,.06);border:1px solid #e2e8f0;}
.setting-card-title{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.1em;color:#94a3b8;margin-bottom:18px;padding-bottom:10px;border-bottom:1px solid #f1f5f9;display:flex;align-items:center;gap:8px;}
.setting-row{display:grid;grid-template-columns:150px 1fr;gap:14px;align-items:flex-start;margin-bottom:14px;}
.setting-row:last-child{margin-bottom:0;}
.setting-row>label{font-size:.84rem;font-weight:600;color:#475569;padding-top:8px;}
.settings-section-header{font-size:1.1rem;font-weight:800;color:var(--primary);margin-bottom:20px;display:flex;align-items:center;gap:10px;}
.logo-preview{width:120px;height:56px;border:2px dashed #e2e8f0;border-radius:8px;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:.75rem;overflow:hidden;margin-bottom:8px;background:#f8fafc;}
.logo-preview img{max-width:100%;max-height:100%;object-fit:contain;}
.color-row{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1.5px solid #e2e8f0;border-radius:8px;margin-bottom:8px;transition:border-color .15s;}
.color-row:hover{border-color:var(--primary);}
.color-row label{flex:1;font-size:.85rem;font-weight:600;color:#475569;}
.color-input-group{display:flex;align-items:center;gap:8px;}
.color-input-group input[type=color]{width:40px;height:34px;border:none;border-radius:6px;cursor:pointer;padding:2px;}
.color-input-group input[type=text]{font-family:monospace;font-size:.82rem;width:84px;}
.cat-order-list{display:flex;flex-direction:column;gap:8px;}
.cat-order-item{display:flex;align-items:center;gap:12px;padding:12px 16px;border:1.5px solid #e2e8f0;border-radius:10px;background:white;transition:all .15s;}
.cat-order-item:hover{border-color:var(--primary);box-shadow:0 2px 8px rgba(26,58,92,.1);}
.cat-icon-badge{width:34px;height:34px;border-radius:8px;background:var(--primary);display:flex;align-items:center;justify-content:center;color:white;font-size:.9rem;flex-shrink:0;}
.cat-order-name{flex:1;font-weight:700;font-size:.9rem;color:#1e293b;}
.cat-order-actions{display:flex;gap:4px;}
.cat-order-btn{width:28px;height:28px;border:1px solid #e2e8f0;border-radius:6px;background:white;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:.8rem;color:#64748b;transition:all .15s;}
.cat-order-btn:hover:not(:disabled){background:var(--primary);color:white;border-color:var(--primary);}
.cat-order-btn:disabled{opacity:.3;cursor:default;}
.featured-grid{display:flex;flex-direction:column;gap:8px;}
.featured-item{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1.5px solid #e2e8f0;border-radius:10px;background:white;}
.featured-rank{width:24px;height:24px;border-radius:50%;background:var(--primary);color:white;font-size:.7rem;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.featured-thumb{width:52px;height:40px;border-radius:6px;background:linear-gradient(135deg,#1a3a5c,#2c5f8a);overflow:hidden;flex-shrink:0;display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.3);}
.featured-thumb img{width:100%;height:100%;object-fit:cover;}
.featured-title{flex:1;font-size:.85rem;font-weight:600;color:#1e293b;line-height:1.4;}
.featured-remove{background:none;border:none;color:#ef4444;cursor:pointer;font-size:1rem;padding:4px 6px;border-radius:4px;transition:background .15s;}
.featured-remove:hover{background:#fee2e2;}
.ticker-items-list{display:flex;flex-direction:column;gap:6px;margin-bottom:10px;}
.ticker-item-row{display:flex;align-items:center;gap:8px;}
.ticker-item-row input{flex:1;}
.ticker-add-row{display:flex;gap:8px;}
@media(max-width:900px){
  .editor-layout{grid-template-columns:1fr;}
  .settings-layout{grid-template-columns:1fr;}
  .settings-nav{position:static;display:flex;flex-wrap:wrap;gap:4px;}
  .settings-nav-item{font-size:.78rem;padding:8px 10px;}
}
@media(max-width:640px){
  .posts-stats-row{grid-template-columns:1fr 1fr;}
  .editor-topbar .editor-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;}
  .setting-row{grid-template-columns:1fr;}
  .setting-row>label{padding-top:0;}
}
