/* ====================
   GENERAL STYLES
   ==================== */
   * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f9;
    overflow-y: auto; /* Aktifkan scrollbar di level halaman */
    color: #333;
  }
  
  /* ====================
     NAVIGATION BAR
     ==================== */
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    color: white;
    padding: 10px 20px;
  }
  
  .navbar .logo img {
    height: 50px;
  }
  
  .navbar .menu {
    list-style: none;
    display: flex;
    gap: 20px;
  }
  
  .navbar .menu a {
    text-decoration: none;
    color: white;
    font-weight: bold;
  }
  
  .navbar .search-bar input {
    padding: 5px;
    border: none;
    border-radius: 5px;
  }
  
  .navbar .search-bar button {
    padding: 5px 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  /* ====================
     CATALOG SECTION
     ==================== */
  .catalog {
    padding: 20px;
    text-align: center;
  }
  
  .catalog h2 {
    margin-bottom: 20px;
  }
  
  .book-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }
  
  .book-item {
    border: 1px solid #ccc;
    padding: 10px;
    width: 200px;
    text-align: center;
    border-radius: 10px;
  }
  
  .book-item img {
    width: 100%;
    height: 250px;
    border-radius: 5px;
  }
  
  .book-item h3 a {
    text-decoration: none;
    color: inherit;
  }
  
  .book-item button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .book-item button:hover {
    background-color: #0056b3;
  }
  
  /* ====================
     FOOTER
     ==================== */
  .footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 10px 0;
  }
  
  .footer .social-links {
    margin-top: 10px;
  }
  
  .footer .social-links a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
  }
  
  /* ====================
     DETAIL BUKU
     ==================== */
     .book-detail-container {
      display: flex;
      flex-wrap: wrap;
      gap: 30px;
      padding: 20px;
      max-width: 1200px;
      margin: 0 auto;
      justify-content: center;
    }
    
    .book-detail-image,
    .book-detail-info {
      flex: 1;
      min-width: 300px;
    }
    
    .book-detail-image {
      text-align: center; /* Gambar berada di tengah */
    }
    
    .book-detail-image img {
      width: 100%;
      height: auto;
      border-radius: 10px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .book-detail-info {
      text-align: left;
    }
    
    .book-detail-info h1 {
      font-size: 2rem;
      color: #333;
      margin-bottom: 15px;
    }
    
    .book-detail-info p {
      font-size: 1rem;
      line-height: 1.6;
      color: #555;
      margin-bottom: 10px;
    }
    
    .book-detail-info strong {
      color: #333;
      font-weight: bold;
    }
    
    .buy-button {
      background-color: #007BFF;
      color: white;
      border: none;
      padding: 10px 20px;
      font-size: 1rem;
      border-radius: 5px;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }
    
    .buy-button:hover {
      background-color: #0056b3;
    }
    
    /* Responsive Design */
    @media (max-width: 768px) {
      .book-detail-container {
        flex-direction: column;
        align-items: center;
      }
    
      .book-detail-image,
      .book-detail-info {
        width: 100%;
      }
    }
  
  /* ====================
     LOGIN PAGE
     ==================== */
  .login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
  }
  
  .login-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  .login-box h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
  }
  
  .login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
  }
  
  .login-form label {
    font-size: 1rem;
    color: #555;
    text-align: left;
  }
  
  .login-form input {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
  }
  
  .login-form input:focus {
    border-color: #007BFF;
  }
  
  .login-form button {
    padding: 10px;
    font-size: 1rem;
    color: white;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .login-form button:hover {
    background-color: #0056b3;
  }
  
  .error-message {
    margin-top: 15px;
    color: #e74c3c;
    font-size: 0.9rem;
  }
  
  /* ====================
     DASHBOARD
     ==================== */
  .dashboard-container {
    display: flex;
    width: 100%;
    height: 100vh;
  }
  
  /* Sidebar */
  .sidebar {
    width: 250px;
    background-color: #333;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
  }
  
  .sidebar-header h3 {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 20px;
  }
  
  .sidebar-menu ul {
    list-style: none;
    padding: 0;
  }
  
  .sidebar-menu ul li {
    margin-bottom: 10px;
  }
  
  .sidebar-menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
  }
  
  .sidebar-menu ul li a:hover {
    background-color: #555;
  }
  
  .sidebar-menu ul li a.active {
    background-color: #007BFF;
  }
  
  /* Main Content */
  .main-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
  }
  
  .main-header {
    margin-bottom: 20px;
  }
  
  .main-header h2 {
    font-size: 1.5rem;
    color: #333;
  }
  
  /* Statistik */
  .dashboard-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
  }
  
  .stat-card {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    text-align: center;
  }
  
  .stat-card h3 {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
  }
  
  .stat-card p {
    font-size: 1.5rem;
    color: #333;
    font-weight: bold;
  }
  
  /* Aktivitas Terakhir */
  .recent-activity {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
  
  .recent-activity h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 15px;
  }
  
  .recent-activity ul {
    list-style: none;
    padding: 0;
  }
  
  .recent-activity ul li {
    font-size: 1rem;
    color: #555;
    margin-bottom: 10px;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .sidebar {
      width: 100%;
      height: auto;
      flex-direction: row;
      justify-content: space-around;
      padding: 10px;
    }
  
    .sidebar-menu ul {
      display: flex;
      flex-direction: row;
      gap: 10px;
    }
  
    .sidebar-menu ul li a {
      padding: 5px 10px;
    }
  
    .main-content {
      padding: 10px;
    }
  }
  
  /* ====================
     LIST PAGE
     ==================== */
  .book-list {
    margin-top: 20px;
  }
  
  .book-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }
  
  .book-table thead {
    background-color: #007BFF;
    color: white;
  }
  
  .book-table th,
  .book-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }
  
  .book-table th {
    font-weight: bold;
  }
  
  .book-table tbody tr:hover {
    background-color: #f1f1f1;
  }
  
  .book-image {
    width: 50px;
    height: auto;
    border-radius: 5px;
  }
  
  .add-button {
    display: inline-block;
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
  }
  
  .add-button:hover {
    background-color: #218838;
  }
  
  .action-button {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
  }
  
  .action-button.edit {
    background-color: #ffc107;
    color: black;
  }
  
  .action-button.delete {
    background-color: #dc3545;
    color: white;
  }
  
  .action-button.edit:hover {
    background-color: #e0a800;
  }
  
  .action-button.delete:hover {
    background-color: #c82333;
  }
  
  /* ====================
     FORMS (CREATE & EDIT)
     ==================== */
  .form-section {
    margin-top: 20px;
  }
  
  .create-form,
  .edit-form {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  
  .form-group label {
    display: block;
    font-size: 1rem;
    color: #555;
    margin-bottom: 5px;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s ease;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    border-color: #007BFF;
  }
  
  .form-group input[type="file"] {
    padding: 5px;
  }
  
  .submit-button {
    display: inline-block;
    background-color: #007BFF;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .submit-button:hover {
    background-color: #0056b3;
  }

  /* Styling untuk halaman register */
.register-container {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Ubah dari center ke flex-start */
  width: 100%;
  min-height: 100vh; /* Ganti 100vh dengan min-height */
  padding: 20px; /* Tambahkan padding agar konten tidak menempel di tepi */
}

.register-box {
  background-color: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 450px;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.register-box h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5rem;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.register-form label {
  font-size: 1rem;
  color: #555;
  text-align: left;
}

.register-form input,
.register-form textarea {
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.3s ease;
}

.register-form input:focus,
.register-form textarea:focus {
  border-color: #007BFF;
}

.submit-button {
  display: inline-block;
  background-color: #28a745; /* Warna hijau untuk tombol "Daftar" */
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #218838;
}

.error-message {
  margin-top: 15px;
  color: #e74c3c;
  font-size: 0.9rem;
  text-align: center;
}

.register-box p {
  margin-top: 15px;
  font-size: 0.9rem;
  color: #555;
}

.register-box p a {
  color: #007BFF;
  text-decoration: none;
  font-weight: bold;
}

.register-box p a:hover {
  text-decoration: underline;
}

/* Pesan Error */
.register-box .error-message {
  margin-top: 15px;
  color: #e74c3c; /* Warna merah untuk error */
  font-size: 0.9rem;
  text-align: center;
}

/* Pesan Success */
.success-message {
  margin-top: 15px;
  color: #28a745; /* Warna hijau untuk pesan sukses */
  font-size: 0.9rem;
  text-align: center;
}

/* Tabel Pesanan */
.book-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.book-table thead {
  background-color: #007BFF;
  color: white;
}

.book-table th,
.book-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.book-table th {
  font-weight: bold;
}

.book-table tbody tr:hover {
  background-color: #f1f1f1;
}

.action-button.view {
  background-color: #007BFF;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.action-button.view:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  .book-table th,
  .book-table td {
    padding: 10px;
  }
}

/* Tabel Keranjang */
.book-table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.book-table thead {
  background-color: #007BFF;
  color: white;
}

.book-table th,
.book-table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.book-table th {
  font-weight: bold;
}

.book-table tbody tr:hover {
  background-color: #f1f1f1;
}

.book-image {
  width: 50px;
  height: auto;
  border-radius: 5px;
}

.cart-summary {
  margin-top: 20px;
  text-align: right;
}

.cart-summary h3 {
  font-size: 1.2rem;
  color: #333;
}

.submit-button {
  display: inline-block;
  background-color: #28a745; /* Warna hijau untuk tombol checkout */
  color: white;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: #218838;
}

@media (max-width: 768px) {
  .book-table th,
  .book-table td {
    padding: 10px;
  }
}

/* Styling untuk tombol cart */
.book-item .cart-button {
  background-color: #ffc107; /* Warna kuning */
  color: white;
  padding: 10px;
  margin: 10px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.cart-button:hover {
  background-color: #e0a800; /* Warna kuning lebih gelap */
}

.buy-button a {
  text-decoration: none;
  color: white;
}

/* Styling untuk halaman About Us */
.about-us {
  padding: 50px 20px;
  text-align: center;
  background-color: #f9f9f9;
}

.about-us h2 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 30px;
}

.about-us p {
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.about-us h3 {
  font-size: 1.5rem;
  color: #333;
  margin-top: 30px;
  margin-bottom: 15px;
}

.about-us ul {
  list-style: disc;
  padding-left: 20px;
  text-align: left;
  margin: 0 auto;
  max-width: 600px;
}