:root {
  --primary-dark: #002147;
  --accent-gold: #c5a059;
  --bg-light: #f9f8f6;
  --text-main: #2d3748;
  --text-muted: #4a5568;
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.font-serif {
  font-family: "Playfair Display", serif;
}

.text-primary-dark {
  color: var(--primary-dark);
}

.text-muted-custom {
  color: var(--text-muted);
}

/* Navbar */
.navbar {
  background-color: #ffffff !important;
}

.navbar-brand {
  font-size: 1.75rem;
  color: var(--primary-dark) !important;
  text-decoration: none;
}

.brand-icon {
  color: var(--accent-gold);
}

.features-section {
  background-color: #ffffff;
  border-top: 1px solid #f1f5f9;
  flex: 1;
}

.feature-card {
  background-color: var(--bg-light);
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -15px rgba(0, 33, 71, 0.1) !important;
  border-color: rgba(197, 160, 89, 0.3);
  background-color: #ffffff;
}

.feature-icon-wrapper {
  width: 72px;
  height: 72px;
  background-color: rgba(0, 33, 71, 0.04);
  color: var(--accent-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon-wrapper {
  background-color: var(--primary-dark);
  color: #ffffff;
  transform: scale(1.1);
}

.font-sm {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Adjust the original hero section class so it aligns well above the features */
.hero-section {
  padding-top: 140px;
  padding-bottom: 80px;
  min-height: auto;
}

/* Hero Section */
.hero-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 80px;
}

.hero-subtitle {
  color: var(--accent-gold);
  letter-spacing: 2px;
  font-size: 0.85rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

@media (min-width: 576px) {
  .action-buttons {
    flex-direction: row;
  }
}

@media (min-width: 992px) {
  .action-buttons {
    justify-content: flex-start;
  }
}

.btn-portal {
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none !important;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  width: 100%;
  max-width: 280px;
}

@media (min-width: 576px) {
  .btn-portal {
    width: auto;
  }
}

/* Admins Css */

.btn-admin {
  background-color: var(--primary-dark);
  color: #ffffff !important;
}

.btn-admin:hover {
  background-color: #001229;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 33, 71, 0.2);
}

.btn-login {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-dark);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background-color: #001229;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 33, 71, 0.2);
}

.btn-user {
  background-color: var(--accent-gold);
  color: #ffffff !important;
}

.btn-user:hover {
  background-color: #a88544;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(197, 160, 89, 0.25);
}

.hero-image-wrapper {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
}

.hero-image {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 991px) {
  .hero-image-wrapper {
    margin-bottom: 1rem;
  }
}

/* Admin Login */
.login-section {
  flex: 1;
  display: flex;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 100px;
}

.login-container {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.login-card {
  background-color: #ffffff;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.icon-badge {
  width: 56px;
  height: 56px;
  background-color: var(--primary-dark);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-subtitle {
  color: var(--accent-gold);
  letter-spacing: 2px;
  font-size: 0.75rem;
}

.form-label {
  color: var(--text-main);
  font-size: 0.9rem;
}

.input-group-custom {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  z-index: 5;
}

.input-field {
  width: 100%;
  padding: 14px 16px 14px 44px;
  font-size: 0.95rem;
  background-color: #fcfbfa;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  color: var(--text-main);
}

.input-password-field {
  padding-right: 110px;
}

.input-field:focus {
  background-color: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15);
  outline: none;
}

.password-toggle-wrapper {
  position: absolute;
  right: 74px;
  z-index: 6;
  display: flex;
  align-items: center;
}

.forgot-link-inline {
  position: absolute;
  right: 16px;
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 6;
  transition: color 0.2s ease;
}

.forgot-link-inline:hover {
  color: #a88544;
}

.back-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.back-link:hover {
  color: var(--primary-dark);
}

/* Admin Dashboard */
.dashboard-body {
  background-color: #f4f5f7;
  min-height: 100vh;
}

.mobile-header {
  height: 60px;
  z-index: 1030;
}

.dashboard-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background-color: var(--primary-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  transition: all 0.3s ease;
}

.sidebar-header {
  height: 75px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  font-size: 1.4rem;
  color: #ffffff !important;
  text-decoration: none;
}

.sidebar-menu-wrapper {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.menu-category {
  display: block;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #718096;
  margin-bottom: 12px;
  padding-left: 12px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.sidebar-menu li {
  margin-bottom: 4px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #a0aec0;
  text-decoration: none !important;
  font-size: 0.925rem;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

/* Base reset for <button> using .menu-item so it looks exactly like <a> tags */
button.menu-item {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

button.menu-item:focus {
  outline: none;
}

.menu-item:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.04);
}

.menu-item.active {
  color: #ffffff !important;
  background-color: var(--accent-gold);
}

.menu-icon {
  width: 20px;
  margin-right: 12px;
  font-size: 1.05rem;
  text-align: center;
}

/* Sidebar Footer (Profile / Logout Container) */
.sidebar-footer-nav {
  background-color: rgba(0, 0, 0, 0.15);
}

.dashboard-content {
  flex: 1;
  padding: 40px;
  margin-left: 260px;
  min-width: 0;
}

.stat-card {
  border-radius: 16px;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.bg-primary-light {
  background-color: rgba(0, 33, 71, 0.08);
}

.bg-gold-light {
  background-color: rgba(197, 160, 89, 0.12);
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    top: 60px;
    width: 100%;
    bottom: auto;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .sidebar-menu-wrapper {
    overflow-y: visible;
  }

  .dashboard-content {
    margin-left: 0;
    padding: 90px 20px 40px 20px;
  }

  .dashboard-wrapper {
    flex-direction: column;
  }
}

/* Authors */

.search-box input {
  background-color: #ffffff;
  border: 1px solid rgba(0, 33, 71, 0.15) !important;
  color: var(--text-main);
  transition: all 0.25s ease;
}

.search-box input:focus {
  border-color: var(--accent-gold) !important;
  box-shadow:
    0 10px 25px -10px rgba(0, 33, 71, 0.08),
    0 0 0 3px rgba(197, 160, 89, 0.2) !important;
  outline: none;
}

.table {
  background-color: #ffffff;
}

.table thead {
  background-color: rgba(0, 33, 71, 0.03) !important;
  border-bottom: 2px solid rgba(0, 33, 71, 0.08) !important;
}

.table tbody tr {
  border-bottom: 1px solid rgba(0, 33, 71, 0.05) !important;
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: var(--bg-light) !important;
}

.bg-gold-light {
  background-color: rgba(197, 160, 89, 0.1) !important;
  color: var(--accent-gold) !important;
}

.bg-primary-light {
  background-color: rgba(0, 33, 71, 0.05) !important;
  color: var(--primary-dark) !important;
}

.table .btn-light {
  background-color: #ffffff;
  border: 1px solid rgba(0, 33, 71, 0.1);
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.table .btn-light.text-primary-dark:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.table .btn-light.text-danger:hover {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.pagination .page-link {
  border-radius: 6px !important;
  margin: 0 3px;
  border-color: rgba(0, 33, 71, 0.1);
  color: var(--primary-dark);
  background-color: #ffffff;
  padding: 6px 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  color: #ffffff !important;
}

.pagination .page-item:not(.active):not(.disabled) .page-link:hover {
  background-color: var(--bg-light);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.biography-box {
  max-width: 420px;
  line-height: 1.6;
  color: #64748b;
  white-space: normal;
  word-break: break-word;
}

.action-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.action-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  padding: 0;
}

.edit-btn {
  color: var(--primary-dark);
}

.delete-btn {
  color: #dc3545;
}

@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
  }

  .biography-box {
    min-width: 220px;
    max-width: 260px;
  }

  .action-wrapper {
    justify-content: center;
    gap: 6px;
  }

  .action-btn {
    width: 34px;
    height: 34px;
  }
}

/* add-author */

.author-form-card {
  border-radius: 16px;
}

.author-input,
.author-textarea {
  background-color: #fcfbfa !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  color: var(--text-main);
  transition: all 0.25s ease;
}

.author-input {
  height: 46px;
}

.author-textarea {
  min-height: 140px;
  resize: vertical;
  padding: 14px;
}

.author-input:hover,
.author-textarea:hover {
  border-color: rgba(0, 33, 71, 0.25) !important;
}

.author-input:focus,
.author-textarea:focus {
  background-color: #ffffff !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15) !important;
}

.author-input.is-invalid,
.author-textarea.is-invalid {
  border-color: #dc3545 !important;
}

.author-input.is-invalid:focus,
.author-textarea.is-invalid:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
}

.invalid-feedback {
  font-size: 0.875rem;
}

.author-submit-btn {
  background-color: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}
.author-submit-btn,
.author-submit-btn span,
.author-submit-btn i {
  color: #fff !important;
}

.author-submit-btn:hover {
  background-color: #001229;
  color: #fff;
}

.author-submit-btn:hover span,
.author-submit-btn:hover i {
  color: #fff !important;
}

.author-cancel-btn {
  border-radius: 10px;
  padding: 12px 24px;
}

/* footer section */
.main-footer {
  background-color: #ffffff;
  border-top: 1px solid #e2e8f0;
  color: var(--text-main);
}

.footer-brand {
  font-size: 1.5rem;
  color: var(--primary-dark) !important;
  text-decoration: none;
}

/* List Links with smooth slide-right hover effect */
.footer-link-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-link-list a:hover {
  color: var(--accent-gold);
  transform: translateX(5px);
}

/* Modern Circular Social Icons */
.social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  text-decoration: none !important;
}

.social-icon:hover {
  background-color: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #ffffff;
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(197, 160, 89, 0.4);
}

.copyright-text {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 500;
}

/* SweetAlert Toast */
.small-toast {
  padding: 10px 14px !important;
  border-radius: 10px !important;
  width: auto !important;
  min-width: 300px !important;
  max-width: 400px !important;
  display: flex !important;
  align-items: center !important;
}

/* Icon */
.small-toast .swal2-icon {
  margin: 0 10px 0 0 !important;
  flex-shrink: 0 !important;
}

/* Message */
.small-toast .swal2-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  margin: 0 !important;

  flex: 1 !important;
  text-align: left !important;

  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;

  line-height: 1.4 !important;

  order: 2 !important;
}

/* Keep icon left */
.small-toast .swal2-icon {
  order: 1 !important;
}

/* Keep close button right */
.small-toast .swal2-close {
  order: 3 !important;
  margin-left: auto !important;

  font-size: 18px !important;

  flex-shrink: 0 !important;
}

/* Profile Page */

.profile-hero-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0, 33, 71, 0.08);
  box-shadow: 0 8px 24px rgba(0, 33, 71, 0.05);
  overflow: hidden;
}

.profile-hero-cover {
  height: 130px;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    #003366 60%,
    var(--accent-gold) 150%
  );
}

.profile-hero-body {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 0 32px 28px 32px;
  margin-top: -50px;
}

.profile-avatar-wrap {
  flex-shrink: 0;
}

.profile-avatar,
.profile-avatar-placeholder {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid var(--accent-gold);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.profile-avatar {
  object-fit: cover;
  display: block;
}

.profile-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  color: var(--primary-dark);
  font-size: 2.6rem;
  line-height: 1;
}

.profile-avatar-placeholder i {
  display: block;
}

.profile-hero-info {
  padding-bottom: 4px;
  margin-top: 60px;
}

.profile-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-role-badge {
  background: var(--primary-dark) !important;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  letter-spacing: 0.03em;
}

.profile-hero-email {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

@media (max-width: 767px) {
  .profile-hero-cover {
    height: 110px;
  }

  .profile-hero-body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 24px 28px 24px;
  }

  .profile-hero-info {
    margin-top: 12px;
  }

  .profile-hero-meta {
    justify-content: center;
  }
}

.profile-card {
  border: none;
  border-radius: 18px;
  overflow: hidden;
}

.profile-header-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background-color: rgba(197, 160, 89, 0.12);
  color: var(--accent-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.profile-card .card-header {
  border-bottom: 1px solid #edf2f7;
}

.profile-card .card-body {
  padding: 1.75rem;
}

.profile-field {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  transition: background-color 0.2s ease;
}

.profile-field:hover {
  background-color: var(--bg-light);
}

.profile-field-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  background-color: rgba(0, 33, 71, 0.05);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.profile-field-text {
  min-width: 0;
}

.profile-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7b8794;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.profile-value {
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 0.97rem;
  min-height: 24px;
  word-break: break-word;
}

/* Edit Profile Button */

.btn-primary-custom {
  background: var(--primary-dark);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.7rem 1.3rem;
  font-weight: 600;
  transition: 0.25s ease;
}

.btn-primary-custom:hover {
  background: #001229;
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 991px) {
  .profile-card .card-body {
    padding: 1.4rem;
  }
}

@media (max-width: 576px) {
  .profile-avatar,
  .profile-avatar-placeholder {
    width: 90px;
    height: 90px;
  }

  .profile-avatar-placeholder {
    font-size: 2.2rem;
  }

  .profile-hero-body {
    margin-top: -45px;
  }

  .profile-label {
    font-size: 0.72rem;
  }

  .profile-value {
    font-size: 0.9rem;
  }
}

.author-input.is-invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
  display: block !important;
}

.invalid-feedback {
  display: none;
  margin-top: 6px;
  font-size: 0.875rem;
  color: #dc3545;
}
