/* Base Styles */
:root {
  --primary-color: #171d6d;
  --secondary-color: #7735f6;
  --accent-color: #00ff7f;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --gray: #e0e0e0;
  --dark-gray: #333333;
  --black: #000000;
  --sidebar-width: 250px;
  --header-height: 60px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--light-gray);
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 600;
  text-align: center;
}

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

.btn-small {
  padding: 6px 12px;
  font-size: 14px;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
}

.btn-outline:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background-color: var(--light-gray);
  color: var(--dark-gray);
  transition: var(--transition);
}

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

.btn-icon.delete:hover {
  background-color: #ff3b30;
}

/* Admin Container */
.admin-container {
  display: flex;
  min-height: 100vh;
}

/* Admin Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--primary-color);
  color: var(--white);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: var(--transition);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-logo h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
}

.admin-logo span {
  color: var(--accent-color);
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 18px;
  cursor: pointer;
}

.admin-menu {
  padding: 15px 0;
}

.admin-menu ul li {
  margin-bottom: 5px;
}

.admin-menu a {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.7);
  border-left: 3px solid transparent;
}

.admin-menu a:hover,
.admin-menu a.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-left-color: var(--accent-color);
}

.admin-menu a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer a:hover {
  color: var(--white);
}

.sidebar-footer a i {
  margin-right: 10px;
}

/* Admin Content */
.admin-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
}

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

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.admin-dropdown {
  position: relative;
}

.admin-dropdown-toggle {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
}

.admin-dropdown-toggle:hover {
  background-color: var(--light-gray);
}

.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
}

.admin-dropdown-toggle span {
  margin-right: 10px;
}

.admin-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  box-shadow: var(--shadow);
  min-width: 180px;
  border-radius: 4px;
  padding: 10px 0;
  display: none;
}

.admin-dropdown:hover .admin-dropdown-menu {
  display: block;
}

.admin-dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  color: var(--dark-gray);
}

.admin-dropdown-menu a:hover {
  background-color: var(--light-gray);
}

.admin-dropdown-menu a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--gray);
  margin: 8px 0;
}

/* Main Content */
main {
  padding: 20px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 24px;
  color: var(--primary-color);
}

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

.stat-card {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background-color: rgba(119, 53, 246, 0.1);
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 20px;
}

.stat-content h3 {
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--dark-gray);
}

.stat-number {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-color);
}

.dashboard-sections {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

.recent-guides,
.quick-actions {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 18px;
  color: var(--primary-color);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.action-card {
  background-color: var(--light-gray);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: var(--transition);
}

.action-card:hover {
  background-color: var(--secondary-color);
  color: var(--white);
}

.action-icon {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.action-card:hover .action-icon {
  color: var(--white);
}

.action-card h3 {
  font-size: 14px;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

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

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--gray);
}

th {
  background-color: var(--light-gray);
  font-weight: 600;
  color: var(--primary-color);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(245, 245, 245, 0.5);
}

.thumbnail {
  width: 60px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background-color: var(--gray);
}

.badge.featured {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.actions {
  display: flex;
  gap: 5px;
}

.no-results {
  text-align: center;
  padding: 30px;
  color: #777;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.pagination-link {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 5px;
  border-radius: 4px;
  background-color: var(--white);
  color: var(--dark-gray);
  box-shadow: var(--shadow);
}

.pagination-link:hover,
.pagination-link.active {
  background-color: var(--secondary-color);
  color: var(--white);
}

/* Forms */
.form-container {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 30px;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--gray);
  border-radius: 4px;
  font-size: 16px;
}

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

.form-group.checkbox {
  display: flex;
  align-items: center;
}

.form-group.checkbox input {
  width: auto;
  margin-right: 10px;
}

.form-group.checkbox label {
  margin-bottom: 0;
}

.form-help {
  font-size: 12px;
  color: #777;
  margin-top: 5px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.current-image {
  margin-bottom: 15px;
}

.current-image img {
  max-width: 200px;
  border-radius: 4px;
  margin-bottom: 5px;
}

.current-image p {
  font-size: 12px;
  color: #777;
}

/* Alerts */
.alert {
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.alert.success {
  background-color: rgba(0, 255, 127, 0.2);
  border: 1px solid var(--accent-color);
  color: #2c7a4e;
}

.alert.error {
  background-color: rgba(255, 59, 48, 0.2);
  border: 1px solid #ff3b30;
  color: #c1272d;
}

.alert ul {
  margin-top: 10px;
  padding-left: 20px;
}

.alert ul li {
  list-style-type: disc;
}

/* Filter Section */
.filter-section {
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: flex-end;
}

.filter-form .form-group {
  flex: 1;
  min-width: 200px;
  margin-bottom: 0;
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.login-container {
  width: 100%;
  max-width: 400px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.login-header {
  text-align: center;
  padding: 30px;
  background-color: var(--primary-color);
  color: var(--white);
}

.login-header h1 {
  font-size: 24px;
  margin-bottom: 5px;
}

.login-header p {
  font-size: 14px;
  opacity: 0.8;
}

.login-form {
  padding: 30px;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
}

.input-icon input {
  padding-left: 40px;
}

.btn-login {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}

.login-footer {
  text-align: center;
  padding: 15px;
  border-top: 1px solid var(--gray);
  font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .dashboard-sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    transform: translateX(-100%);
    z-index: 1001;
  }

  .sidebar-close {
    display: block;
  }

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

  .sidebar-toggle {
    display: block;
  }

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

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

@media (max-width: 576px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

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

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }
}

