/* =====================================================
   ROOT VARIABLES
===================================================== */
:root {
  --rb-primary: #badecb;
  --rb-dark: #0f172a;
  --rb-muted: #64748b;
  --rb-bg: #f8fafc;
  --rb-white: #ffffff;
}

/* =====================================================
   GLOBAL RESET
===================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--rb-bg);
  color: var(--rb-dark);
}

/* =====================================================
   LOGIN PAGE
===================================================== */
.rb-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.rb-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--rb-white);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.08);
}

.rb-login-title {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
}

.rb-login-form input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.rb-login-btn {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 8px;
  background: var(--rb-primary);
  color: #083c35;
  font-weight: 600;
  cursor: pointer;
}

/* =====================================================
   DASHBOARD LAYOUT
===================================================== */
.rb-dash-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ================= SIDEBAR ================= */
.rb-dash-sidebar {
  width: 260px;
  background: var(--rb-white);
  border-right: 1px solid #e5e7eb;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.rb-dash-logo {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 32px;
}

.rb-dash-menu a {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--rb-dark);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  transition: background 0.2s ease;
}

.rb-dash-menu a:hover,
.rb-dash-menu a.active {
  background: var(--rb-primary);
  color: #083c35;
}

.rb-dash-spacer {
  flex: 1;
}

/* ================= CONTENT ================= */
.rb-dash-content {
  flex: 1;
  padding: 32px 36px;
}

/* ================= TOP BAR ================= */
.rb-dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.rb-dash-topbar h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.rb-dash-user {
  font-size: 14px;
  color: var(--rb-muted);
}

/* ================= DASHBOARD CARDS ================= */
.rb-dash-cards {
  width: 100%;
}

.rb-dash-card {
  background: var(--rb-white);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.06);
  transition: transform 0.2s ease;
  overflow: hidden;
  word-wrap: break-word;
}

.rb-dash-card:hover {
  transform: translateY(-3px);
}

.rb-dash-card h6 {
  font-size: 13px;
  color: var(--rb-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rb-dash-card h2 {
  font-size: 30px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.rb-dash-card span {
  font-size: 12px;
  color: var(--rb-muted);
  display: block;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =====================================================
   TABLES (FOR LEADS / BLOGS)
===================================================== */
.rb-table {
  width: 100%;
  background: var(--rb-white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.rb-table th,
.rb-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.rb-table th {
  background: #f1f5f9;
  font-weight: 600;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 992px) {
  .rb-dash-wrapper {
    flex-direction: column;
  }

  .rb-dash-sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
  }

  .rb-dash-menu {
    display: flex;
    gap: 8px;
  }

  .rb-dash-menu a {
    margin-bottom: 0;
  }

  .rb-dash-spacer {
    display: none;
  }
}

@media (max-width: 768px) {
  .rb-dash-content {
    padding: 24px 20px;
  }
}
/* ================= BLOG ADD PAGE ================= */

.rb-blog-form {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  max-width: 900px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.06);
}

/* Labels */
.rb-blog-form .rb-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #0f172a;
}

/* Inputs & Textareas */
.rb-blog-form .rb-input,
.rb-blog-form .rb-textarea,
.rb-blog-form select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  background: #ffffff;
  margin-bottom: 18px;
}

.rb-blog-form .rb-textarea {
  min-height: 90px;
  resize: vertical;
}

/* TinyMCE container fix */
.tox-tinymce {
  border-radius: 8px !important;
  margin-bottom: 20px;
}

/* Section divider */
.rb-blog-form hr {
  margin: 30px 0;
  border-color: #e5e7eb;
}

/* FAQ BOX */
.rb-faq-box {
  border: 1px dashed #cbd5e1;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  background: #f8fafc;
}

/* Buttons */
.rb-blog-form .rb-btn {
  background: #badecb;
  border: none;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
  color: #083c35;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rb-blog-form .rb-btn:hover {
  background: #9fe3d2;
}

/* Add FAQ button spacing */
.rb-blog-form .rb-add-faq {
  margin-bottom: 20px;
}

/* Top spacing */
.rb-blog-form h5 {
  font-weight: 600;
  margin-bottom: 16px;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {
  .rb-blog-form {
    padding: 24px;
  }
}

/* =====================================================
   BLOG LISTING PAGE
===================================================== */

/* Top bar already exists (rb-dash-topbar) */

/* Search & Filter */
.rb-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.rb-filter .rb-input {
  max-width: 320px;
}

/* Blog Table Wrapper */
.rb-table {
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Table */
.rb-table table {
  width: 100%;
  border-collapse: collapse;
}

.rb-table th,
.rb-table td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
}

.rb-table th {
  background: #f1f5f9;
  font-weight: 600;
  color: #0f172a;
}

/* Title column text control */
.rb-table td:first-child {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status badges */
.rb-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.rb-badge.published {
  background: #dcfce7;
  color: #166534;
}

.rb-badge.draft {
  background: #e5e7eb;
  color: #334155;
}

/* Action links */
.rb-table .rb-link {
  font-size: 14px;
  text-decoration: none;
  color: #2563eb;
}

.rb-table .rb-link:hover {
  text-decoration: underline;
}

.rb-delete-blog {
  color: #dc2626;
}

.rb-delete-blog:hover {
  text-decoration: underline;
}

/* Pagination */
.rb-pagination {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.rb-pagination .rb-link {
  padding: 6px 10px;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.rb-pagination .rb-link.fw-bold {
  background: #badecb;
  color: #083c35;
}

/* =====================================================
   RESPONSIVE (BLOG LIST)
===================================================== */
@media (max-width: 768px) {
  .rb-filter {
    flex-direction: column;
  }

  .rb-filter .rb-input {
    max-width: 100%;
  }

  .rb-table th:nth-child(2),
  .rb-table td:nth-child(2),
  .rb-table th:nth-child(4),
  .rb-table td:nth-child(4) {
    display: none;
  }
}

/* ===== BLOG TABLE ===== */
.rb-filter{display:flex;gap:12px;margin-bottom:20px}
.rb-input{padding:10px 12px;border-radius:8px;border:1px solid #e5e7eb;font-size:14px;background:#fff}
.rb-btn{background:#badecb;border:none;padding:10px 16px;border-radius:8px;font-weight:600;color:#083c35;text-decoration:none}

.rb-table{background:#fff;border-radius:16px;overflow:hidden;box-shadow:0 15px 40px rgba(0,0,0,.06)}
.rb-table th,.rb-table td{padding:16px 18px;font-size:14px;border-bottom:1px solid #e5e7eb}
.rb-table th{background:#f1f5f9;font-weight:600}

.rb-title{max-width:380px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.rb-badge{padding:5px 12px;border-radius:20px;font-size:12px;font-weight:600}
.rb-badge.published{background:#dcfce7;color:#166534}
.rb-badge.draft{background:#e5e7eb;color:#334155}

.rb-actions a{font-size:13px;text-decoration:none;margin-right:10px}
.rb-actions .edit{color:#2563eb}
.rb-actions .delete{color:#dc2626}

.rb-pagination{display:flex;gap:10px;justify-content:flex-end;margin-top:22px}
.rb-page{padding:8px 12px;border-radius:8px;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.05);text-decoration:none;color:#0f172a;font-size:14px}
.rb-page.active{background:#badecb;color:#083c35;font-weight:600}
