@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --background-color: #f7efef;
  --foreground-color: #222222;
  --primary-color: #075d46;
  --primary-hover-color: #064635;
  --primary-light-color: #19a580;
  --primary-hover-color: #084131;
  --notification-color: #e6a721;
  --header-bg-color: #fffbfb;
  --danger-color: #e74c3c;
  --success-color: #2ecc71;
  --gray-color: #bdc3c7;
  --text-mute-color: #666666;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--background-color);
  color: var(--foreground-color);
  height: 100vh;
  overflow: hidden;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-textfield-decoration-container,
input[type="password"]::-webkit-clear-button,
input[type="password"]::-webkit-inner-spin-button,
input[type="password"]::-webkit-calendar-picker-indicator {
  display: none;
  -webkit-appearance: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button {
  visibility: hidden;
  display: none !important;
}

input[type="date"] {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #333;
  background-color: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

input[type="date"]:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(47, 109, 102, 0.2);
}

input[type="date"]:hover {
  border-color: var(--primary-color);
}

/* General layout */
.flex {
  display: flex;
}

.text-mute {
  color: var(--text-mute-color);
}

.text-success {
  color: var(--success-color) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

.text-neutral {
  color: var(--gray-color);
}

.avatar {
  border-radius: 100vw;
  object-fit: cover;
  object-position: center;
}

button {
  all: unset;
  cursor: pointer;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5em 0.75em;
  border-radius: 0.3rem;
  color: #fff;
  transition: all 0.2s;
}

button:hover {
  background-color: var(--primary-hover-color);
}

button.edit,
button.delete,
button.view,
button.approve,
button.reject {
  padding: unset;
}

button.edit:hover,
button.delete:hover,
button.view:hover {
  scale: 1.1;
}

.btn-secondary {
  background: #ddd;
  color: #888;
}

.btn-secondary:hover {
  background: #ccc;
}

/* Main Layout */
.main-layout {
  display: flex;
  width: 100%;
}

/* Sidebar Base */
.sidebar {
  width: 80px;
  background: #0f4a49;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0;
  height: 100vh;
  transition: width 0.3s ease;
}

.sidebar.expanded {
  width: 300px;
  align-items: flex-start;
}

.sidebar-logo {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
  position: relative;
  margin-bottom: 1rem;
}

.sidebar-logo>img {
  width: 50px;
  border-radius: 100vw;
  background-color: white;
}

.sidebar.expanded #toggleSidebar {
  rotate: 0deg;
}

#toggleSidebar {
  position: absolute;
  background: var(--primary-light-color-color);
  border: none;
  cursor: pointer;
  padding: 0 0.5em;
  font-size: 1.5rem;
  top: 5px;
  right: -1rem;
  z-index: 2;
  border-radius: 100vw;
  background-color: var(--primary-light-color);
  rotate: 180deg;
  transition: all 400ms ease-in-out;
}

#toggleSidebar:hover {
  background-color: var(--primary-color);
}

.sidebar-nav {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  width: 100%;
}

.sidebar-nav li {
  width: 100%;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem;
  padding-left: 1.5em;
  color: #fff;
  font-size: 1rem;
  position: relative;
  gap: 1rem;
  transition: background 0.3s;
  text-decoration: none;
}

.sidebar-nav a img {
  width: 32px;
  flex-shrink: 0;
}

.nav-text {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  white-space: nowrap;
}

/* When Expanded */
.sidebar.expanded .nav-text {
  opacity: 1;
  visibility: visible;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: var(--primary-hover-color, #136b69);
}

#logoutBtn {
  display: flex;
  align-items: center;
  padding: 1rem;
  padding-left: 1.5em;
  gap: 1rem;
  color: #fff;
}

.main-content {
  flex: 1;
  overflow-y: auto;
}

/* Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background-color: var(--header-bg-color);
  padding: 1.5rem 2rem;
}

.header-left h1 {
  font-size: 1.6rem;
  font-weight: 700;
  text-transform: capitalize;
}

.header-left p {
  font-size: 0.9rem;
  color: #666;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-bar-container {
  position: relative;
}

.search-bar-container>img {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
}

.search-bar-container>input {
  width: 200px;
  font-size: 1rem;
  padding: 0.25em 0.5em 0.25em 2em;
  border-radius: 0.3rem;
  border: 1px solid var(--primary-color);
}

.search-bar-container>input:focus {
  outline: 1px solid var(--primary-color);
}

#notification-holder {
  position: relative;
  cursor: pointer;
  display: flex;
}

#notification-holder:hover {
  background-color: #2ecc7054;
  border-radius: 100vw;
}

#notification-holder>img {
  width: 2rem;
  height: 2rem;
}

#notification-holder.show-notif::after {
  content: "";
  position: absolute;
  top: 0;
  left: 60%;
  background-color: var(--notification-color);
  width: 0.75rem;
  height: 0.75rem;
  border: 1px solid #fff;
  border-radius: 100vw;
}

#notification-popup {
  display: none;
  position: absolute;
  top: 110%;
  right: 0;
  background-color: #fff;
  border: 1px solid #b9b9b9;
  border-radius: 0.3rem;
  z-index: 50;
  padding: 0.25em 1em;
  min-width: 20rem;
  min-height: 10rem;
  max-height: 20rem;
  overflow-y: auto;
}

#notification-popup.show {
  display: block;
}

#notification-list {
  list-style: none;
}

.notification-item {
  position: relative;
  margin: 0.5rem 0;
}

.notification-item:hover {
  background-color: #cccccc20;
  border-radius: 0.3rem;
}

.notification-item.show-indicator::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 1rem;
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--notification-color);
  border: 1px solid #fff;
  border-radius: 100vw;
}

.notification-item p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 200px;
}

.notification-item .item-created-at {
  font-size: 0.8rem;
  color: #8b8b8b;
}

.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 100vw;
  object-fit: cover;
  object-position: center;
}

.content {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Modal overlay */
.modal-container {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.modal-container.show {
  opacity: 1;
  visibility: visible;
}

/* Modal box */
.modal {
  background-color: var(--background-color, #fff);
  border-radius: 0.5rem;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

/* Header */
.modal-header {
  background-color: var(--primary-color, #007bff);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}

.close-btn:hover {
  background-color: unset;
  transform: scale(1.1);
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}