@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");

*, *::before, *::after {
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

a { text-decoration: none; }

:root {
  --drop-shadow-400:
    0px 4px 4px -4px rgba(12, 12, 13, 0.05),
    0px 16px 32px -4px rgba(12, 12, 13, 0.1);
  --drop-shadow-600: 0px 16px 32px -8px rgba(12, 12, 13, 0.4);
}

/* ── Common Page ── */
.homepage, .data-alat, .data-bahan {
  background-color: #132063;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  position: relative;
  display: flex;
  justify-content: center;
}

.data-alat, .data-bahan {
  overflow-y: auto;
}

.homepage {
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgba(115, 129, 200, 1) 0%,
    rgba(60, 73, 141, 1) 79%
  );
}

/* ── Inner wrapper ── */
.homepage-inner, .data-alat-inner, .data-bahan-inner {
  width: 100%;
  max-width: 414px;
  min-height: 100vh;
  position: relative;
}

.data-alat-inner, .data-bahan-inner {
  padding-bottom: 40px;
}

/* ── Decorative ellipses ── */
.ellipse {
  top: 535px;
  left: -212px;
  background-blend-mode: hard-light;
  background: linear-gradient(
    180deg,
    rgba(184, 179, 247, 1) 0%,
    rgba(7, 2, 64, 1) 70%
  );
  position: absolute;
  width: 527px;
  height: 567px;
  border-radius: 263.5px / 283.5px;
  filter: blur(2px);
  opacity: 0.5;
}

.ellipse-top {
  position: absolute;
  top: -174px;
  left: 99px;
  background: linear-gradient(
    180deg,
    rgba(15, 11, 67, 1) 37%,
    rgba(217, 214, 255, 1) 100%
  );
  width: 527px;
  height: 567px;
  border-radius: 263.5px / 283.5px;
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
}

.data-alat .ellipse-top, .data-bahan .ellipse-top {
  top: -223px;
  left: 86px;
  width: 594px;
  height: 625px;
  border-radius: 297px / 312.5px;
  background: linear-gradient(
    180deg,
    rgba(2, 0, 27, 1) 35%,
    rgba(63, 55, 179, 1) 100%
  );
}

.ellipse-bottom {
  position: absolute;
  top: 535px;
  left: -212px;
  width: 527px;
  height: 567px;
  border-radius: 263.5px / 283.5px;
  background: linear-gradient(
    180deg,
    rgba(44, 34, 179, 1) 0%,
    rgba(9, 4, 67, 1) 59%
  );
  filter: blur(2px);
  opacity: 0.5;
  pointer-events: none;
}

/* ── Homepage Specifics ── */
.logo-container {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 180px;
  z-index: 2;
}

.logo-container img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.3));
}

.app-title {
  position: absolute;
  top: 280px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  white-space: nowrap;
}

.app-title h1 {
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 900;
  color: #ffffff;
  font-size: 32px;
  letter-spacing: 1px;
  line-height: 1.2;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.divider {
  position: absolute;
  top: 375px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  z-index: 2;
}

.btn-alat,
.btn-bahan {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 78px;
  background-color: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  box-shadow: var(--drop-shadow-600);
  display: flex;
  align-items: center;
  z-index: 2;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-alat { top: 430px; }
.btn-bahan { top: 540px; }

.btn-alat:hover,
.btn-bahan:hover {
  transform: translateX(-50%) translateY(-3px) scale(1.03);
  box-shadow: 0px 20px 40px -8px rgba(12, 12, 13, 0.5);
  background-color: #ffffff;
}

.btn-alat:active,
.btn-bahan:active {
  transform: translateX(-50%) scale(0.97);
}

.btn-icon-wrap {
  width: 70px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-icon-wrap i {
  font-size: 28px;
  color: #2d3a6e;
}

.btn-divider {
  width: 1.5px;
  height: 50px;
  background: rgba(0, 0, 0, 0.12);
}

.btn-text {
  flex: 1;
  text-align: center;
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 700;
  color: #0f101d;
  font-size: 32px;
  letter-spacing: 1px;
}

.admin-link {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.admin-link a {
  color: rgba(255, 255, 255, 0.5);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-link a:hover {
  color: rgba(255, 255, 255, 0.9);
}

/* ── Top bar (List pages) ── */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 0;
  height: 75px;
}

.btn-back {
  width: 53px;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 28px;
  border-radius: 12px;
  transition: background 0.2s;
}

.btn-back:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.topbar-logo {
  width: 59px;
  height: 59px;
}

.topbar-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topbar-logo svg {
  width: 100%;
  height: 100%;
}

.page-title {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 0 20px;
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 700;
  color: #ffffff;
  font-size: 28px;
  letter-spacing: 0;
  line-height: normal;
}

.search-bar {
  position: relative;
  z-index: 2;
  margin: 0 47px 24px;
}

.search-bar input {
  width: 100%;
  height: 45px;
  border-radius: 15px;
  border: none;
  outline: none;
  background-color: #d9d9d9;
  box-shadow: 0px 4px 4px #00000040;
  padding: 0 16px 0 42px;
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #000;
}

.search-bar input::placeholder {
  color: rgba(0, 0, 0, 0.35);
  font-weight: 700;
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.item-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 37px;
}

.item-card {
  background-color: #d9d9d9;
  border-radius: 16px;
  box-shadow: var(--drop-shadow-600);
  padding: 16px 20px;
  animation: cardIn 0.35s ease forwards;
  opacity: 0;
  transform: translateY(10px);
}

.item-card.borrowed {
  background-color: #ffcccc;
  border: 1px solid #ff9999;
}

.item-card.borrowed .item-name {
  color: #cc0000;
}

.item-card.borrowed .row-icon,
.item-card.borrowed .row-text {
  color: #880000;
}

.item-card.borrowed .row-divider {
  background: rgba(204, 0, 0, 0.2);
}

.item-card:nth-child(1) { animation-delay: 0.05s; }
.item-card:nth-child(2) { animation-delay: 0.1s; }
.item-card:nth-child(3) { animation-delay: 0.15s; }
.item-card:nth-child(4) { animation-delay: 0.2s; }
.item-card:nth-child(5) { animation-delay: 0.25s; }
.item-card:nth-child(6) { animation-delay: 0.3s; }
.item-card:nth-child(7) { animation-delay: 0.35s; }
.item-card:nth-child(8) { animation-delay: 0.4s; }
.item-card:nth-child(9) { animation-delay: 0.45s; }
.item-card:nth-child(10) { animation-delay: 0.5s; }

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.item-name {
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 700;
  color: #000000;
  font-size: 16px;
  line-height: normal;
  margin-bottom: 6px;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.item-row .row-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 14px;
}

.item-row .row-divider {
  width: 1px;
  height: 18px;
  background: rgba(0,0,0,0.15);
  margin: 0 4px;
}

.item-row .row-text {
  font-family: 'Inter', Helvetica, sans-serif;
  font-weight: 700;
  color: #000000;
  font-size: 14px;
  line-height: normal;
}

.empty-state,
.no-results {
  text-align: center;
  padding: 48px 16px;
  color: rgba(255,255,255,0.5);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
}

.empty-state i,
.no-results i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.4;
}

.no-results {
  display: none;
  position: relative;
  z-index: 2;
}

/* ── Responsive ── */
@media (max-height: 700px) {
  .logo-container { top: 40px; width: 140px; height: 140px; }
  .app-title { top: 210px; }
  .app-title h1 { font-size: 26px; }
  .divider { top: 290px; }
  .btn-alat { top: 320px; height: 68px; }
  .btn-bahan { top: 410px; height: 68px; }
  .btn-text { font-size: 26px; }
}
