:root {
  --red: #e50914;
  --white: #ffffff;
  --light-grey: #f7f9fc;
  --dark: #111;
  --blue: #0d6efd;
  --blue-dark: #0b5ed7;
  --danger: #dc3545;
  --danger-dark: #bb2d3b;
}

/* 🌙 Dark mode overrides */
body.dark-mode {
  background-color: #121212;
  color: #eaeaea;
}

body.dark-mode .admin-header {
  background-color: #1e1e1e;
  color: #fff;
}

body.dark-mode a {
  color: #9ecbff;
}

body.dark-mode .btn-primary {
  background-color: #333;
  border-color: #444;
}

body.dark-mode table {
  background: #1c1c1c;
  color: #eaeaea;
}

body.dark-mode input, 
body.dark-mode select, 
body.dark-mode textarea {
  background: #2a2a2a;
  color: #eaeaea;
  border: 1px solid #444;
}


.dashboard-container {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #1f2937;
  color: #fff;
  height: 100vh;     /* ✅ add */
  padding-top: 1.5rem;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
}


.sidebar {
  scrollbar-width: thin;
  scrollbar-color: #888 #1f2937;
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 3px;
}
.sidebar::-webkit-scrollbar-track {
  background: #1f2937;
}


.sidebar-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.sidebar-logo {
  width: 50px;
  height: auto;
  margin-bottom: 0.5rem;
}

.sidebar-title {
  font-size: 1.3rem;
  font-weight: 550;
  color: white;
}

.sidebar-header h2 {
  font-size: 1.2rem;
  color: #fff;
  margin: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.3s, color 0.3s;
}

.sidebar-menu li a i {
  min-width: 20px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: #374151;
  color: #ffffff;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  color: #d1d5db;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.sidebar-menu a i {
  margin-right: 10px;
  font-size: 1rem;
}

.sidebar-menu a:hover {
  background-color: #374151;
  color: #ffffff;
}

.sidebar .logo {
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: var(--red);
}

.sidebar ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.sidebar ul li {
  margin: 1rem 0;
}

.sidebar ul li a {
  color: white;
  text-decoration: none;
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
}

.sidebar ul li a:hover {
  background: #222;
}

.sidebar .submenu {
  display: none;
  padding-left: 1rem;
  background: #1e1e1e;
}

.sidebar .has-submenu.active .submenu {
  display: block;
}

.has-submenu.active .submenu {
  display: block;
}

.sidebar li a {
  display: block;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
}

.sidebar li a:hover {
  background-color: #444;
}

/* Main Content */
.dashboard-main {
  flex: 1;
  margin-left: 250px; /* match sidebar width */
  overflow-x: hidden; /* prevent horizontal scroll */
  padding: 20px;
}

/* Topbar */
.topbar {
  margin-bottom: 1.5rem;
}

.topbar h2 {
  font-size: 1.5rem;
  color: var(--dark);
}

.search-bar {
  padding: 0.5rem;
  width: 300px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile img {
  border-radius: 50%;
  width: 35px;
}

.profile span {
  margin-left: 0.5rem;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  text-align: center;
  font-size: 1rem;
}

/* Charts */
.charts-section {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.chart-box {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  flex: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Cards */
.card {
  background: var(--white);
  padding: 2rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.06);
  animation: fadeIn 0.4s ease-in-out;
}

/* Indent sub-menu titles */
.styled-table td:first-child {
  white-space: nowrap;
}

.styled-table td:first-child::before {
  content: attr(data-prefix);
  margin-right: 4px;
  color: #888;
}


/* Form */
.form-grid.menu-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.form-group {
  flex: 1 1 30%;
  display: flex;
  flex-direction: column;
}

.form-group input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--red);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
  margin-top: auto;
}

.btn-primary:hover {
  background: #c10710;
}

/* Table */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  min-width: 800px;
}

.styled-table thead {
  background-color: var(--red);
  color: white;
}

.styled-table th,
.styled-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.styled-table tbody tr:hover {
  background-color: #f3f3f3;
}

.styled-table td:last-child {
  display: flex;
  gap: 0.5rem;
}

/* Buttons */
.btn {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  border: none;
}

.btn-edit {
  background-color: var(--blue);
  color: white;
}

.btn-edit:hover {
  background-color: var(--blue-dark);
}

.btn-delete {
  background-color: var(--danger);
  color: white;
}

.btn-delete:hover {
  background-color: var(--danger-dark);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


.card h3 {
  margin-bottom: 1rem;
  color: var(--red);
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

textarea {
  resize: vertical;
  min-height: 80px;
}


.has-submenu > a {
  cursor: pointer;
  font-weight: bold;
  display: block;
  color: #fff;
}

.submenu {
  display: none;
  list-style: none;
  padding-left: 1rem;
  background-color: #1a1a1a;
  margin-top: 0.3rem;
}

.submenu li a {
  font-weight: normal;
  padding: 0.5rem 1rem;
  display: block;
  color: #ccc;
  text-decoration: none;
}

.submenu li a:hover {
  background-color: #333;
}


/* Blog Form Styles */
.blog-form {
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  animation: fadeIn 0.3s ease-in-out;
}

.blog-form h3 {
  color: var(--red);
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
}

.blog-form .form-group {
  margin-bottom: 1.2rem;
}

.blog-form .form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
  color: #333;
}

.blog-form .form-group input,
.blog-form .form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
}

.blog-form .form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Button Styling */
.btn-primary {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: #c10710;
}

.btn-edit {
  background-color: var(--blue);
  color: white;
}

.btn-edit:hover {
  background-color: var(--blue-dark);
}

.btn-delete {
  background-color: var(--danger);
  color: white;
}

.btn-delete:hover {
  background-color: var(--danger-dark);
}

/* Blog Listing Table */
.blog-listing .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1rem;
}

.blog-listing .topbar h2 {
  font-size: 1.5rem;
  color: var(--dark);
}

.pagination {
  margin-top: 1rem;
}
.pagination .btn {
  margin-right: 5px;
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 4px;
  background: #ccc;
  color: #000;
}
.pagination .btn-primary {
  background: #c10710;
  color: #fff;
}


.styled-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  table-layout: fixed;
  overflow-x: auto;
}

.styled-table thead {
  background-color: var(--red);
  color: white;
}

.styled-table th,
.styled-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
  word-wrap: break-word;
  max-width: 180px;
}

.styled-table tbody tr:hover {
  background-color: #f7f7f7;
}

.styled-table img {
  border-radius: 6px;
  object-fit: cover;
}

/* Action Buttons */
.styled-table td:last-child {
  display: flex;
  gap: 0.5rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .blog-form, .styled-table {
    font-size: 0.9rem;
  }

  .styled-table th, .styled-table td {
    padding: 0.7rem;
  }

  .blog-listing .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}


.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1.2rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.alert.success {
  background-color: #d1e7dd;
  color: #0f5132;
  border-left: 4px solid #198754;
}

.alert.danger {
  background-color: #f8d7da;
  color: #842029;
  border-left: 4px solid #dc3545;
}




.site-footer {
  background: #111;
  color: #eee;
  padding: 40px 20px 20px;
  animation: fadeInUp 1s ease-in-out;
  font-family: 'Segoe UI', sans-serif;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1 1 220px;
}

.footer-column h4 {
  color: #fff;
  margin-bottom: 15px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin-bottom: 10px;
}

.footer-column ul li a {
  color: #ccc;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: #fff;
}

.social-icons a {
  margin-right: 10px;
  display: inline-block;
}

.social-icons img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s;
}

.social-icons a:hover img {
  transform: scale(1.1);
}

.footer-newsletter {
  text-align: center;
  margin: 40px 0 20px;
}

.footer-newsletter h4 {
  margin-bottom: 10px;
  color: #fff;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.newsletter-form input[type="email"] {
  padding: 10px;
  width: 250px;
  border: none;
  border-radius: 4px;
}

.newsletter-form button {
  background: #e63946;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.newsletter-form button:hover {
  background: #c9303c;
}

.footer-bottom {
  text-align: center;
  padding: 20px 0 0;
  font-size: 14px;
  color: #bbb;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: #e63946;
  color: white;
  border: none;
  font-size: 20px;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: background 0.3s;
  z-index: 1000;
}

.back-to-top:hover {
  background: #c9303c;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }
}

.newsletter-message {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}
.styled-table th, .styled-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}
.styled-table th {
  background-color: #f5f5f5;
  color: #333;
}
.success {
  background: #d4edda;
  color: #155724;
  padding: 10px;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.activity-table th, .activity-table td {
    padding: 0.5rem;
    border: 1px solid #ddd;
    text-align: left;
}
.activity-table th {
    background: #f0f0f0;
}
.recent-activity h3 {
    margin-bottom: 0.5rem;
}




