/* 🌿 GLOBAL STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #333;
}

.admin-wrapper {
  display: flex;
  min-height: 100vh;
}

/* 🌿 SIDEBAR */
.admin-sidebar {
  width: 250px;
  background: #1e2f23;
  color: white;
  display: flex;
  flex-direction: column;
  padding: 2rem 1rem;
  transition: all 0.3s ease-in-out;
}

.admin-logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-nav .nav-link {
  text-decoration: none;
  color: #c9f7c2;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 1rem;
  border-radius: 5px;
  transition: background 0.3s;
}

.admin-nav .nav-link:hover {
  background: #2f4f36;
}

/* 🌿 MAIN CONTENT */
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 🌿 HEADER */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
  font-size: 1.8rem;
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.admin-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* 🌿 CONTENT AREA */
.admin-content {
  padding: 2rem;
  flex: 1;
  overflow-y: auto;
}

/* 🌿 MOBILE RESPONSIVE NAVIGATION */
@media (max-width: 992px) {

  /* Slightly smaller text for tablets */
  .customerdata table,
  .supplierlist table,
  .adminlist table {
    font-size: 14px;
  }
}

@media (max-width: 768px) {

  /* Admin wrapper becomes column for mobile */
  .admin-wrapper {
    flex-direction: column-reverse;
  }

  /* Sidebar shrinks and moves to bottom */
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: fixed;
    bottom: 0;
    left: 0;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1000;
    background: #1e2f23;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
  }

  .admin-logo {
    display: none;
  }

  .admin-nav {
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    gap: 0;
    align-items: center;
  }

  .admin-nav .nav-link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    color: #c9f7c2;
  }

  .admin-nav .nav-link i {
    font-size: 1.2rem;
  }

  .admin-main {
    padding-bottom: 70px;
    /* prevent content under sidebar */
  }

  .admin-content {
    padding: 1rem;
  }

  /* Shrink header for mobile */
  .admin-header {
    padding: 0.7rem 1rem;
    flex-wrap: wrap;
  }

  .admin-header h1 {
    font-size: 1.2rem;
  }

  .admin-user img {
    width: 32px;
    height: 32px;
  }

  .admin-user span {
    font-size: 0.8rem;
  }

  /* Tables smaller on mobile */
  .customerdata table,
  .supplierlist table,
  .adminlist table {
    font-size: 13px;
  }

  .customerdata th,
  .supplierlist th,
  .adminlist th,
  .customerdata td,
  .supplierlist td,
  .adminlist td {
    padding: 6px 8px;
    white-space: nowrap;
  }

  .table-responsive::after {
    content: "↔ Swipe to view more columns";
    display: block;
    text-align: center;
    color: #888;
    font-size: 12px;
    margin-top: 4px;
  }
}

@media (max-width: 576px) {

  /* More compact table font */
  .customerdata table,
  .supplierlist table,
  .adminlist table {
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 5px;
  }

  /* Header adjustments */
  .admin-header h1 {
    font-size: 1rem;
  }

  .admin-user span {
    display: none;
  }

  .admin-user img {
    width: 28px;
    height: 28px;
  }

  /* Sidebar nav links smaller */
  .admin-nav .nav-link {
    font-size: 0.65rem;
    padding: 0.4rem;
  }

  .admin-nav .nav-link i {
    font-size: 1rem;
  }

  .search-bar input {
    width: 90%;
    max-width: 100%;
  }

  .search-bar button {
    width: 100%;
    font-size: 14px;
  }
}

/* 🌿 SERVICE PAGE */
h2,
h3 {
  color: #343a40;
}

.container {
  margin-top: 40px;
  text-align: left !important;
}

.table-responsive {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table th,
.table td {
  vertical-align: middle !important;
}

.table img {
  border-radius: 5px;
  border: 1px solid #dee2e6;
}

.btn {
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: scale(1.05);
}

/* 🌿 SERVICE FORM */
.serviceform {
  max-width: 700px;
  margin: 60px auto;
  background-color: #ffffff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.modal-header {
  background-color: #fd550d;
  color: white;
}

@media (max-width: 576px) {
  .table img {
    width: 70px;
  }
}

/* 🌿 PROFILE PAGE */
.profile-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  width: 100%;
}

.profile-container h2 {
  margin-bottom: 20px;
  text-align: center;
  color: #00bf63;
}

.profile-pic {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.profile-pic img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00bf63;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.form-group input[type="file"] {
  padding: 6px;
}

.update-btn {
  width: 100%;
  padding: 12px;
  background-color: #00bf63;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.update-btn:hover {
  background-color: #009f53;
}

@media (max-width: 600px) {
  body {
    padding: 20px;
  }

  .profile-container {
    padding: 20px;
  }
}

/* 🌿 CONTACT DETAIL */
.customerdata table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.customerdata th,
.customerdata td {
  padding: 12px 15px;
  text-align: left;
  border: 1px solid #ddd;
  font-size: 14px;
}

.customerdata th {
  background-color: #f4f4f4;
  color: #333;
  font-weight: bold;
}

.customerdata tr:nth-child(even) {
  background-color: #f9f9f9;
}

.customerdata tr:hover {
  background-color: #eaeaea;
  cursor: pointer;
}

.search-bar {
  margin: 20px 0;
  text-align: center;
}

.search-bar input {
  padding: 10px 15px;
  width: 250px;
  border: 2px solid #ddd;
  border-radius: 25px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-bar input:focus {
  border-color: #007bff;
}

.search-bar button {
  padding: 10px 15px;
  border: none;
  background-color: #007bff;
  color: white;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  margin-left: 10px;
  transition: background-color 0.3s ease;
}

/* 🌿 PAGINATION */
/* Pagination Container */
.pagination ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
  list-style: none;
  margin: 0;
}

/* Pagination List Items */
.pagination ul li {
  display: inline-block;
}

/* Pagination Links */
.pagination ul li a {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 5px;
  font-size: 14px;
  background-color: #f8f9fa;
  color: #333;
  border: 1px solid #ccc;
  text-decoration: none;
  transition: all 0.3s;
}

/* Active Link */
.pagination ul li a.active {
  background-color: #007bff;
  color: #fff;
  border-color: #007bff;
}

/* Hover Effect */
.pagination ul li a:hover {
  background-color: #00bf63;
  color: #fff;
  border-color: #00bf63;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
  .pagination ul li a {
    padding: 4px 8px;
    font-size: 12px;
  }
}

/* 🌿 DESCRIPTION BOX */
.desc-box {
  max-width: 300px;
  word-wrap: break-word;
  text-align: left;
}

.full-desc {
  display: block;
  margin-top: 10px;
}

.btn-link {
  color: #007bff;
  cursor: pointer;
  font-size: 14px;
  background: none;
  border: none;
  text-decoration: underline;
  padding: 0;
  transition: color 0.3s ease;
}

.btn-link:hover {
  color: #0056b3;
  text-decoration: none;
}
/* 🌿 FIX MODAL VISIBILITY */
.modal {
  z-index: 2000 !important;
}

.modal-backdrop {
  z-index: 1999 !important;
}

/* Allow internal scrolling for tall modals */
.modal-dialog {
  max-height: 90vh;
}

.modal-body {
  overflow-y: auto;
  max-height: 70vh;
}


