* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f2f4f7;
  margin: 0;
  color: #1f2937;
}

.topnav {
  background: #1f6feb;
  color: #fff;
}
.topnav-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.brand { font-weight: 600; }
.nav-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 16px;
  opacity: 0.92;
}
.nav-links a:hover { text-decoration: underline; }

.container {
  max-width: 1000px;
  margin: 24px auto;
  padding: 0 20px;
}

h1, h2 { margin-top: 0; }

.add-form, .settings-form {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; }
.form-group-checkbox { grid-column: 1 / -1; flex-direction: row; align-items: center; }
.form-group-checkbox label { display: flex; align-items: center; gap: 8px; font-weight: normal; }

label { font-weight: 600; font-size: 14px; margin-bottom: 6px; color: #374151; }

input[type="text"], input[type="password"] {
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  width: 100%;
}

button, .btn {
  background: #1f6feb;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: #1758c4; }
.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #52596a; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-small { padding: 6px 10px; font-size: 13px; }

.form-group button { align-self: flex-end; }

.settings-form { max-width: 480px; }
.settings-form label { margin-top: 12px; }

.hint { color: #6b7280; font-size: 13px; margin-top: -4px; margin-bottom: 14px; }

.bulk-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.bulk-row { display: grid; grid-template-columns: 36px 2fr 1fr; gap: 10px; align-items: center; }
.bulk-row-header { font-weight: 600; color: #374151; font-size: 13px; padding-bottom: 2px; }
.bulk-no { color: #6b7280; font-size: 13px; text-align: right; }
.bulk-actions { margin-top: 16px; display: flex; gap: 10px; }


  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.list-actions { display: flex; gap: 10px; }

.table-wrap {
  background: #fff;
  border-radius: 10px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f3;
  font-size: 14px;
  vertical-align: middle;
}
th { background: #f9fafb; font-weight: 600; color: #374151; }
.qr-thumb { width: 70px; height: 70px; }

.empty { color: #6b7280; }

.alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; margin-top: 16px; }
.alert-success { background: #dcfce7; color: #166534; }

/* login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-box {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 360px;
}
.login-box h1 { font-size: 20px; margin-bottom: 2px; }
.subtitle { color: #6b7280; margin-top: 0; margin-bottom: 20px; font-size: 13px; }
.login-box form { display: flex; flex-direction: column; }
.login-box label { margin-top: 10px; }
.login-box button { margin-top: 18px; }

/* print view */
.print-toolbar {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
}
.print-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
}
.print-card {
  border: 1px solid #333;
  border-radius: 4px;
  padding: 10px 14px;
  text-align: center;
  page-break-inside: avoid;
  width: 260px;
}
.print-card img { width: 150px; height: 150px; }
.print-caption { font-weight: 700; font-size: 15px; margin-top: 6px; }
.print-teks { font-weight: 600; font-size: 14px; margin-top: 2px; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-grid { padding: 0; }
  .print-card { border: 1px solid #000; }
}
