/* Import font Poppins (hanya sekali di atas) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Header menu - Sidebar */
.menu {
  width: 240px;
  max-width: 100%;
  display: flex;
  justify-content: center;
  background-color: #f4f1ea;
  padding: 12px 0;
  margin: 0;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 0;
  height: 100vh; /* Sidebar sepanjang layar */
  position: sticky;
  top: 0;
  font-family: "Poppins", sans-serif;
}

.menu-inner {
  width: 1100px; /* Mungkin terlalu lebar untuk sidebar, sesuaikan jika perlu */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
}

/* Default link di menu */
.menu a.slice {
  --c1: #4a4a4a;
  --c2: #8ca789;
  position: relative;
  overflow: hidden;
  padding: 8px 16px;
  font-weight: 500;
  font-size: 15px;
  color: var(--c1);
  text-decoration: none;
  border-radius: 4px;
  transition: 0.3s ease;
}

.menu a.slice .text {
  position: relative;
  z-index: 1;
  font-weight: 600;
  transition: color 0.4s ease;
}

.menu a.slice:hover {
  border: 2px solid var(--c2);
  background-color: #f4f8f3;
  color: var(--c2);
  box-shadow: 0 0 8px rgba(140,167,137,0.4);
}

.menu a.slice::after {
  content: "";
  position: absolute;
  inset: 50%;
  transform: translate(-50%, -50%) rotate(30deg);
  background-color: var(--c2);
  height: calc(300% + 1em);
  width: 0;
  transition: width 700ms cubic-bezier(0.83, 0, 0.17, 1);
  z-index: 0;
}

.menu a.slice:hover::after {
  width: calc(120% + 1em);
}

.menu a.slice:hover .text {
  color: #32492f;
}

.menu a.slice:active {
  transform: scale(0.97);
}

.menu a.box {
  width: 150px;
  padding: 10px 20px;
  text-align: center;
  margin-left: 20px;
  background: #f4f8f3;
  border-radius: 8px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: #4d6a4a;
  border: 2px solid #8ca789;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.146);
  transition: 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.menu a.box:before {
  position: absolute;
  content: '';
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  border-bottom: 4px solid transparent;
  border-left: 4px solid transparent;
  box-sizing: border-box;
  transform: translateX(100%);
}

.menu a.box:after {
  position: absolute;
  content: '';
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  border-top: 4px solid transparent;
  border-right: 4px solid transparent;
  box-sizing: border-box;
  transform: translateX(-100%);
}

.menu a.box:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.menu a.box:hover:before {
  border-color: #8a8f00;
  height: 100%;
  transform: translateX(0);
  transition: .3s transform linear, .3s height linear .3s;
}

.menu a.box:hover:after {
  border-color: #6e7600;
  height: 100%;
  transform: translateX(0);
  transition: .3s transform linear, .3s height linear .5s;
}

.button {
  color: #4d6a4a;
  text-decoration: none;
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
}

/* Perbaikan untuk tombol login di sidebar - dibuat lebih lebar dan menggunakan gaya seperti form login */
.menu a.login-btn {
  background: lightblue; /* Menggunakan background seperti form login */
  border: 2px solid black; /* Border seperti form */
  box-shadow: 4px 4px black; /* Shadow seperti form */
  color: #323232; /* Warna teks seperti form */
  padding: 10px 20px; /* Padding untuk lebar lebih */
  width: 200px; /* Lebar tetap agar lebih lebar dari sebelumnya */
  text-align: center; /* Center text */
  border-radius: 5px; /* Border radius seperti form */
  font-weight: 600; /* Font weight seperti form */
  transition: 0.3s ease; /* Transition */
  display: inline-block; /* Agar width berfungsi */
}

.menu a.login-btn:hover {
  color: #666; /* Warna hover seperti form */
  transform: scale(1.05); /* Scale seperti sebelumnya */
  box-shadow: 0px 0px black; /* Shadow aktif seperti form */
}

.menu li.active a.slice {
  background-color: white; /* Warna putih untuk active */
  color: #4d6a4a; /* Warna teks agar kontras */
  border: 2px solid #8ca789; /* Opsional, untuk konsistensi */
  box-shadow: 0 0 8px rgba(140,167,137,0.4); /* Opsional, efek seperti hover */
}

/* Container utama (diperbaiki duplikasi display) */
.container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row; /* Gabung dari duplikasi, pilih row untuk sidebar di samping */
  max-height: 120vh;
  text-align: center;
}

/* Content area */
.contentt { /* Asumsikan ini untuk main content, ganti nama jika perlu */
  flex: 1;
  padding: 20px;
}

/* Form umum - diperbarui dengan gaya baru seperti yang diberikan */
.form {
  --input-focus: #2d8cf0; /* Diubah ke #2d8cf0 seperti contoh */
  --font-color: #323232;
  --font-color-sub: #666;
  --bg-color: beige;
  --main-color: black;
  width: 280px; /* Diperbaiki dari 100px agar lebih fleksibel */
  padding: 20px; /* Diubah ke 20px seperti contoh */
  background: lightblue; /* Diubah ke lightblue seperti contoh */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  box-shadow: 4px 4px var(--main-color);
}

.title {
  color: var(--font-color); /* Diubah ke var(--font-color) seperti contoh */
  font-weight: 900; /* Diubah ke 900 seperti contoh */
  font-size: 20px;
  margin-bottom: 25px;
}

.title span {
  color: var(--font-color-sub); /* Diubah ke var(--font-color-sub) */
  font-weight: 600; /* Diubah ke 600 seperti contoh */
  font-size: 17px;
}

.input {
  width: 250px; /* Diubah ke 250px seperti contoh */
  height: 40px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  background-color: var(--bg-color);
  box-shadow: 4px 4px var(--main-color);
  font-size: 15px;
  font-weight: 600; /* Diubah ke 600 seperti contoh */
  color: var(--font-color);
  padding: 5px 10px;
  outline: none;
}

.input::placeholder {
  color: var(--font-color-sub);
  opacity: 0.8;
}

.input:focus {
  border: 2px solid var(--input-focus);
}

.login-with {
  display: flex;
  gap: 20px;
}

.button-log {
  cursor: pointer;
  width: 40px; /* Diubah ke 40px seperti contoh */
  height: 40px; /* Diubah ke 40px seperti contoh */
  border-radius: 100%;
  border: 2px solid var(--main-color);
  background-color: var(--bg-color);
  box-shadow: 4px 4px var(--main-color);
  color: var(--font-color);
  font-size: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon {
  width: 24px;
  height: 24px;
  fill: var(--main-color);
}

.button-log:active, .button-confirm:active {
  box-shadow: 0px 0px var(--main-color);
  transform: translate(3px, 3px);
}

.button-confirm {
  margin: 50px auto 0 auto;
  width: 120px;
  height: 40px;
  border-radius: 5px;
  border: 2px solid var(--main-color);
  background-color: var(--bg-color);
  box-shadow: 4px 4px var(--main-color);
  font-size: 17px;
  font-weight: 600;
  color: var(--font-color);
  cursor: pointer;
}

/* Form area umum */
.form_area {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #e6cdae;
  height: auto;
  width: auto;
  border: 2px solid #264143;
  border-radius: 20px;
  box-shadow: 3px 4px 0px 1px #d2e507;
}

.sub_title {
  font-weight: 400;
  margin: 5px 0;
}

.form_group {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  margin: 10px;
}

.form_style {
  outline: none;
  border: 2px solid #264143;
  box-shadow: 3px 4px 0px 1px #938500;
  width: 290px;
  padding: 12px 10px;
  border-radius: 4px;
  font-size: 15px;
}

.form_style:focus, .btn:focus {
  transform: translateY(4px);
  box-shadow: 1px 2px 0px 0px #c7ff11;
}

.btn {
  padding: 15px;
  margin: 25px 0px;
  width: 150px;
  font-size: 15px;
  background: #A6CF98;
  border-radius: 10px;
  font-weight: 600;
  color: #264143;
  border: 2px solid #6E8F6A;
  box-shadow: 3px 3px 0px 0px #6E8F6A;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn:hover {
  opacity: .9;
}

.link {
  font-weight: 600;
  color: #264143;
  padding: 5px;
}

/* Tabel */
.table-container {
  display: flex;
  max-width: 100%; /* Diperbaiki dari 150px agar lebih fleksibel */
  justify-content: center;
  align-items: center;
  margin: 20px 0;
  font-family: "Poppins", sans-serif;
}

table {
  width: 100%;
  max-width: 100%; /* Diperbaiki dari 80px agar tabel bisa melebar */
  border-collapse: collapse;
  background-color: #f4f8f3;
  border: 2px solid #8ca789;
  border-radius: 8px;
  box-shadow: 4px 4px #6e8f6a;
  overflow: hidden;
}

thead {
  background-color: #96a981;
}

th {
  padding: 15px 10px;
  text-align: left;
  font-weight: 600; /* Diperbaiki dari 100 agar lebih tebal */
  font-size: 15px;
  color: #264143;
  border-bottom: 2px solid #8ca789;
}

td {
  padding: 12px 10px;
  font-size: 14px;
  color: #323232;
  border-bottom: 1px solid #d7e289;
}

tbody tr:nth-child(even) {
  background-color: #e6cdae;
}

tbody tr:hover {
  background-color: #f4f1ea;
  transform: translateY(-2px);
  transition: 0.3s ease;
}

td:last-child {
  text-align: center;
}

td a {
  color: #4d6a4a;
  text-decoration: none;
  font-weight: 500; /* Diperbaiki dari 100 */
  margin: 0 5px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: 0.3s ease;
}

td a:hover {
  background-color: #8ca789;
  color: #f4f8f3;
  box-shadow: 0 0 8px rgba(140,167,137,0.4);
}

/* Judul dan link tambah */
h2 {
  text-align: center;
  color: #264143;
  font-family: "Poppins", sans-serif;
  font-weight: 600; /* Diperbaiki dari 200 agar lebih tebal */
  margin-bottom: 20px;
}

.add-link {
  display: block;
  text-align: center;
  margin-bottom: 20px;
  color: #4d6a4a;
  text-decoration: none;
  font-weight: 500; /* Diperbaiki dari 200 */
  padding: 10px 20px;
  background-color: #f4f8f3;
  border: 2px solid #8ca789;
  border-radius: 8px;
  transition: 0.3s ease;
}

.add-link:hover {
  background-color: #8ca789;
  color: #f4f8f3;
  box-shadow: 0 0 8px rgba(140,167,137,0.4);
}

/* Form untuk supplier (unik) */
.container-supplier {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  margin: 20px 0;
}

.form_area-supplier {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #e6cdae;
  height: auto;
  max-width: 400px; /* Diperbaiki dari 100px agar lebih realistis */
  border: 2px solid #264143;
  border-radius: 20px;
  box-shadow: 3px 4px 0px 1px #d2e507;
  padding: 30px;
}

.title-supplier {
  color: #264143;
  font-weight: 600;
  font-size: 1.5em;
  margin-top: 20px;
  margin-bottom: 20px;
  font-family: "Poppins", sans-serif;
}

.form-supplier {
  --input-focus-supplier: #d7e289;
  --font-color-supplier: #323232;
  --font-color-sub-supplier: #666;
  --bg-color-supplier: beige;
  --main-color-supplier: black;
  width: 100%;
  max-width: 400px; /* Diperbaiki dari 100px */
  padding: 20px;
  background: #96a981;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  border-radius: 5px;
  border: 2px solid var(--main-color-supplier);
  box-shadow: 4px 4px var(--main-color-supplier);
  font-family: "Poppins", sans-serif;
}

.form-table-supplier {
  width: 100%;
  border-collapse: collapse;
}

.form-table-supplier td {
  padding: 10px 0;
}

.label-supplier {
  font-weight: 400;
  color: #264143;
  text-align: left;
  width: 80px;
}

.input-supplier {
  width: 100%;
}