@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #5B4FE9;
  --primary-dark: #4338CA;
  --primary-light: #8B7EFA;
  --green: #0FA968;
  --green-soft: #DCFCE9;
  --red: #E8495F;
  --red-soft: #FDE3E7;
  --orange: #E58A1F;
  --orange-soft: #FDECD1;

  --bg-a: #F1EEFE;
  --bg-b: #EAF9F3;
  --card-bg: #ffffff;
  --text: #1B1730;
  --muted: #837E9C;
  --border: #E8E4F7;

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI", sans-serif;

  --shadow-card: 0 4px 18px rgba(76, 63, 168, 0.08), 0 1px 3px rgba(76, 63, 168, 0.06);
  --shadow-btn: 0 8px 20px rgba(91, 79, 233, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(720px 420px at 12% -8%, rgba(139, 126, 250, 0.20), transparent 60%),
    radial-gradient(620px 420px at 100% 0%, rgba(15, 169, 104, 0.14), transparent 55%),
    linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 8px;
}

header h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--muted);
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

select, input[type="text"], input[type="number"], input[type="password"], input[type="email"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  font-size: 15px;
  font-family: var(--font-body);
  background: #FBFAFF;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

select:focus, input:focus {
  outline: none;
  border-color: var(--primary-light);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(91, 79, 233, 0.12);
}

.hidden { display: none !important; }

.periode-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 4px;
  border-bottom: 1px dashed var(--border);
}
.periode-item:last-child { border-bottom: none; }

.periode-info .nama-periode {
  font-weight: 700;
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 15px;
}
.periode-info .nominal-periode {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}

.badge {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  padding-left: 22px;
}
.badge::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge.lunas { background: var(--green-soft); color: var(--green); }
.badge.menunggu { background: var(--orange-soft); color: var(--orange); }
.badge.belum { background: var(--red-soft); color: var(--red); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
  box-shadow: var(--shadow-btn);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-primary:active { transform: translateY(0); }

.btn-small {
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: 9px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  width: auto;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-small:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-accept { background: linear-gradient(135deg, var(--green), #0C8A56); color: #fff; }
.btn-reject { background: linear-gradient(135deg, var(--red), #C6394D); color: #fff; }
.btn-cash { background: linear-gradient(135deg, var(--orange), #C4740E); color: #fff; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(27, 23, 48, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}

.modal-content {
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px 24px;
  max-width: 400px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(27, 23, 48, 0.35);
  border-top: 4px solid var(--primary);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: var(--bg-a);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.close-btn:hover { background: var(--border); }

.nominal {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 4px 0 16px;
}

.qris-img {
  width: 100%;
  max-width: 260px;
  display: block;
  margin: 0 auto 12px;
  border-radius: 14px;
  border: 2px dashed var(--primary-light);
  padding: 6px;
  background: #fff;
}

.hint {
  font-size: 13px;
  color: var(--muted);
  margin: 6px 0 10px;
  line-height: 1.5;
}

.status-msg {
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
  text-align: center;
}
.status-msg.success { color: var(--green); }
.status-msg.error { color: var(--red); }

footer {
  text-align: center;
  margin-top: 30px;
}
.admin-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.admin-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* Admin dashboard */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-a);
}
th:first-child { border-top-left-radius: 10px; }
th:last-child { border-top-right-radius: 10px; }
tbody tr:hover { background: #FAF9FF; }
tbody tr:last-child td { border-bottom: none; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.top-bar h1 {
  font-family: var(--font-display);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logout-btn {
  background: #fff;
  border: 1.5px solid var(--border);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--red);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.logout-btn:hover { border-color: var(--red); transform: translateY(-1px); }

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-form select, .inline-form input {
  width: auto;
  flex: 1;
  min-width: 120px;
}
.bukti-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.bukti-link:hover { color: var(--primary-dark); }
