@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* Custom scrollbar start */
::-webkit-scrollbar:vertical {
  width: 6px;
}

::-webkit-scrollbar:horizontal {
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-text-light);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-muted);
  border-radius: 8px;
  border: 2px solid var(--color-muted);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-muted-hover);
}
/* Custom scrollbar end */

:root {
  --color-primary: #1976d2;
  --color-primary-hover: #1565c0;
  --color-text-dark: #313131;
  --color-text-light: #ffffff;
  --color-secondary: #e0e0e0;
  --color-background: #fafafa;
  /* 
  ARSIP - warna tombol edit dan hapus lama
  --color-accent: #4caf50;
  --color-accent-hover: #43a047;
  --color-danger: #f44336;
  --color-danger-hover: #d32f2f; 
  */
  --color-accent: #43a047;
  --color-accent-hover: #388e3c;
  --color-danger: #e53935;
  --color-danger-hover: #d32f2f;
  --color-muted: #707070;
  --color-muted-hover: #555555;
  --color-white: #fff;
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  text-decoration: none;
  font-size: 1rem;
}

body {
  font-family: 'Inter', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--color-background);
  color: var(--color-text-dark);
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem 2rem;
  flex: 1;
}

/* header and footer style start */
header,
footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background-color: var(--color-primary);
  color: var(--color-text-light);
}

header h1 {
  font-size: 1.5rem;
}

footer p {
  font-size: 0.9rem;
}
/* header and footer style end */

/* form style start */
#form-section {
  max-width: 1200px;
  margin: 1rem auto 0 auto;
  padding: 1.5rem;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#form-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  text-align: center;
}

#form-mahasiswa {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 80vh;
}

#form-mahasiswa div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

#form-mahasiswa div label,
#form-mahasiswa input,
#form-mahasiswa button {
  font-size: 1rem;
}

#form-mahasiswa label {
  font-weight: 600;
  color: var(--color-text-dark);
}

#form-mahasiswa input {
  padding: 0.9rem;
  border: 1.5px solid var(--color-secondary);
  border-radius: 6px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#form-mahasiswa input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 1px 3px rgba(25, 118, 210, 0.1);
  outline: none;
}

#form-actions {
  display: flex;
  flex-direction: row;
  gap: 0.8rem;
  margin-top: 0.5rem;
}

#form-mahasiswa button {
  padding: 0.9rem;
  border: none;
  border-radius: 6px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  flex: 1;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

#form-mahasiswa button:hover {
  transform: translateY(-1px);
}

#btn-simpan {
  background-color: var(--color-primary);
}

#btn-simpan:hover {
  background-color: var(--color-primary-hover);
}

#btn-reset {
  background-color: var(--color-muted);
}
#btn-reset:hover {
  background-color: var(--color-muted-hover);
}
/* form style end */

/* filter data mahasiswa start */
#search-and-filter-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

#search-wrapper,
#sort-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

#search-wrapper {
  flex: 1;
}

#sort-wrapper {
  flex-shrink: 0;
}

#search-wrapper input {
  flex: 1;
  min-width: 250px;
}

/* sort start */
#sort-wrapper {
  position: relative;
  display: inline-block;
  max-width: 200px;
  width: 100%;
  font-size: 0.95rem;
}

#sort-wrapper .trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--color-secondary);
  border-radius: 6px;
  background: var(--color-white);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#sort-wrapper .trigger span {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#sort-wrapper.open .trigger {
  border-color: var(--color-primary);
  box-shadow: 0 0 2px 3px rgba(25, 118, 210, 0.1);
}

#sort-wrapper .trigger i {
  transition: transform 0.35s ease-in;
  color: var(--color-muted);
  font-size: 0.8rem;
}
#sort-wrapper.open .trigger #sort-icon {
  transform: rotate(180deg);
  color: var(--color-primary);
}

#sort-wrapper .options {
  position: absolute;
  top: 110%;
  left: 0;
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-secondary);
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  list-style: none;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  transition: all 0.4s ease-in;
  z-index: 100;
}

#sort-wrapper.open .options {
  opacity: 1;
  max-height: 300px;
  pointer-events: auto;
}

#sort-wrapper .options li {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

#sort-wrapper .options li:hover {
  background: var(--color-primary);
  color: var(--color-text-light);
}

#sort-wrapper .options li i {
  margin-right: 0.5rem;
  color: var(--color-muted);
  width: 1rem;
  text-align: center;
}

#sort-wrapper .options li:hover i {
  color: var(--color-white);
}
/* sort end */

#search-and-filter-wrapper label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

#search-and-filter-wrapper select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

#search-and-filter-wrapper input,
#search-and-filter-wrapper select {
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--color-secondary);
  border-radius: 6px;
  font-size: 0.95rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

#search-and-filter-wrapper input:focus,
#search-and-filter-wrapper select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 2px 3px rgba(25, 118, 210, 0.1);
}
/* filter data mahasiswa end */

/* table mahasiswa start */
.table-wrapper {
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#table-section {
  width: 100%;
  margin: 0 auto 1rem auto;
  padding: 1.5rem;
  background-color: var(--color-white);
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#table-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
  text-align: center;
}

#table-section {
  overflow-x: auto;
}

#table-mahasiswa {
  width: 100%;
  min-width: 800px;
  border-collapse: separate;
  border-spacing: 0;
}

#table-mahasiswa caption {
  display: none;
}

#table-mahasiswa th,
#table-mahasiswa td {
  border: 1px solid var(--color-secondary);
  padding: 0.9rem 1rem;
  text-align: left;
}

#table-mahasiswa th {
  background: var(--color-primary);
  color: var(--color-text-light);
  font-weight: 600;
  font-size: 0.95rem;
}

#table-mahasiswa tr:nth-child(even) {
  background-color: #f9f9f9;
}

#table-mahasiswa tr:hover {
  background-color: #f1f7ff;
}

#table-mahasiswa td button {
  margin-right: 0.4rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

#table-mahasiswa td button:hover {
  transform: translateY(-1px);
}

#table-mahasiswa .edit {
  background: var(--color-accent);
  color: var(--color-text-light);
}

#table-mahasiswa .edit:hover {
  background: var(--color-accent-hover);
}

#table-mahasiswa .hapus {
  background: var(--color-danger);
  color: var(--color-text-light);
}

#table-mahasiswa .hapus:hover {
  background: var(--color-danger-hover);
}

.table-actions .action-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.table-actions .action-buttons button {
  flex: 1;
  padding: 0.6rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
}

.table-actions .action-buttons button:hover {
  transform: translateY(-1px);
}

#table-mahasiswa th,
#table-mahasiswa td {
  border: 1px solid var(--color-secondary);
  padding: 0.9rem 1rem;
  text-align: left;
}

#table-mahasiswa th:nth-child(1),
#table-mahasiswa td:nth-child(1) {
  width: 5%;
  text-align: center;
}

#table-mahasiswa th:nth-child(2),
#table-mahasiswa td:nth-child(2) {
  width: 30%;
}

#table-mahasiswa th:nth-child(3),
#table-mahasiswa td:nth-child(3) {
  width: 20%;
}

#table-mahasiswa th:nth-child(4),
#table-mahasiswa td:nth-child(4) {
  width: 30%;
}

#table-mahasiswa th:nth-child(5),
#table-mahasiswa td:nth-child(5) {
  width: 15%;
}
/* table mahasiswa end */

/* not found search start */
#empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 6rem 2rem;
}

#empty-state div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

#empty-state img {
  max-width: 150px;
  opacity: 0.5;
}

#empty-state p {
  font-size: 0.9rem;
  opacity: 0.5;
}
/* not found search end */
