/* Dashboard Styling */

:root {
  --primary-color: #0311F3;
  --secondary-color: #031133;
  --accent-color: #FF6B35;
  --danger-color: #dc3545;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --light-bg: #f8f9fa;
  --dark-text: #333;
  --border-color: #ddd;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dashboard {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-text);
}

/* Dashboard Container */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px !important;
  background: var(--secondary-color);
  color: white;
  padding: 10px;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 30px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu {
  list-style: none;
  padding: 0 !important;
}

.sidebar-menu li {
  margin-bottom: 1px;
}

.sidebar-menu a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background-color: var(--primary-color);
  padding-left: 20px;
}

.main-content {
  margin-left: 250px;
  flex: 1;
  padding: 30px;
  background-color: var(--light-bg);
}

/* Top Navigation */
.top-nav {
  background: white;
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  border-radius: 5px;
}

.top-nav h1 {
  font-size: 28px;
  color: var(--secondary-color);
}

/* Global Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
  gap: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn:active {
  transform: translateY(0);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #0209c0;
  box-shadow: 0 10px 15px -3px rgba(3, 17, 243, 0.3), 0 4px 6px -2px rgba(3, 17, 243, 0.1);
}

.btn-secondary {
  background-color: #f8f9fa;
  color: #555;
  border-color: #ddd;
}

.btn-secondary:hover {
  background-color: #e9ecef;
  border-color: #ccc;
  color: #333;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
  box-shadow: 0 10px 15px -3px rgba(220, 53, 69, 0.3);
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #218838;
  box-shadow: 0 10px 15px -3px rgba(40, 167, 69, 0.3);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
}

/* Dashboard Cards */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--light-bg);
  padding-bottom: 15px;
}

.card-title {
  font-size: 22px;
  color: var(--secondary-color);
  font-weight: 600;
}

.card-subtitle {
  font-size: 14px;
  color: #999;
  margin-top: 5px;
}

.card-body {
  padding: 15px 0;
}

/* Data Tables */
.admin-table-wrapper {
  overflow-x: auto;
  margin-top: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.admin-table thead {
  background-color: #fcfcfc;
}

.admin-table th {
  padding: 18px 15px;
  text-align: left;
  font-weight: 700;
  color: var(--secondary-color);
  border-bottom: 2px solid #eee;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 16px 15px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  vertical-align: middle;
}

.admin-table tbody tr:hover {
  background-color: #f9f9ff;
}

.admin-table img {
  max-width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid #eee;
}

.table-actions {
  display: flex;
  gap: 8px;
}

.btn-edit {
  background-color: var(--primary-color);
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  transition: all 0.3s ease;
}

.btn-edit:hover {
  background-color: #0209c0;
  transform: scale(1.05);
}

.btn-delete {
  background-color: var(--danger-color);
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.btn-delete:hover {
  background-color: #c82333;
  transform: scale(1.05);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--secondary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(3, 17, 243, 0.2);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.form-actions button,
.form-actions a {
  padding: 12px 24px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.form-actions button[type="submit"] {
  background-color: var(--primary-color);
  color: white;
  flex: 1;
}

.form-actions button[type="submit"]:hover {
  background-color: #0209c0;
}

.form-actions a {
  background-color: #6c757d;
  color: white;
  display: inline-block;
}

.form-actions a:hover {
  background-color: #5a6268;
}

/* Dashboard Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
}

.stat-card.success {
  border-left-color: var(--success-color);
}

.stat-card.warning {
  border-left-color: var(--warning-color);
}

.stat-card.danger {
  border-left-color: var(--danger-color);
}

.stat-value {
  font-size: 32px;
  font-weight: bold;
  color: var(--secondary-color);
}

.stat-label {
  font-size: 14px;
  color: #999;
  margin-top: 5px;
}

/* Alert Messages */
.alert {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

.alert-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    width: 80px;
  }

  .sidebar-logo {
    font-size: 16px;
    justify-content: center;
  }

  .sidebar-menu a span {
    display: none;
  }

  .main-content {
    margin-left: 80px;
    padding: 15px;
  }

  .top-nav {
    flex-direction: column;
    gap: 15px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .blog-table {
    font-size: 12px;
  }

  .blog-table th,
  .blog-table td {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    position: absolute;
    left: -250px;
  }

  .main-content {
    margin-left: 0;
  }

  .table-actions {
    flex-direction: column;
  }

  .btn-edit,
  .btn-delete {
    width: 100%;
  }
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #999;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.empty-state-title {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--dark-text);
}

.empty-state-description {
  font-size: 14px;
  margin-bottom: 30px;
}

.empty-state-action {
  display: inline-block;
}

/* Testimonials Grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.testimonial-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.testimonial-card:hover {
  box-shadow: 0 4px 16px rgba(3, 17, 243, 0.15);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.testimonial-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  gap: 12px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  flex-shrink: 0;
}

.testimonial-info h4 {
  margin: 0;
  font-size: 16px;
  color: var(--dark-text);
  font-weight: 600;
}

.testimonial-designation {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #888;
  font-weight: 500;
}

.testimonial-message {
  flex-grow: 1;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  font-style: italic;
  padding: 15px;
  background: #f9f9f9;
  border-left: 4px solid var(--primary-color);
  border-radius: 4px;
}

.testimonial-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border: none;
  border-radius: 4px;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.btn-small:hover {
  background: #0209b8;
  transform: scale(1.05);
}

.btn-delete-small {
  background: var(--danger-color);
}

.btn-delete-small:hover {
  background: #c82333;
}

/* Testimonials Management Page Enhancements */
.testimonials-list {
  overflow-x: auto;
}

.testimonial-row-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: white;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.2s ease;
}

.testimonial-row-item:hover {
  background: #f9f9f9;
}

.testimonial-avatar-small {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
  border: 2px solid var(--primary-color);
}

.testimonial-content {
  flex-grow: 1;
}

.testimonial-name {
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 4px;
}

.testimonial-role {
  font-size: 12px;
  color: #888;
}

/* Stats for Testimonials Card */
.testimonials-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-mini {
  background: white;
  padding: 15px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.stat-mini-value {
  font-size: 28px;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-mini-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive Design for Testimonials */
@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    padding: 15px;
  }

  .testimonial-message {
    padding: 12px;
    font-size: 13px;
  }

  .testimonial-actions {
    gap: 6px;
  }

  .btn-small {
    padding: 5px 10px;
    font-size: 11px;
  }
}