* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nagad-bg {
  min-height: 100vh;
  background: linear-gradient(180deg, #9f0a0a 0%,  #9f0a0a 100%);
  color: white;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  max-width: 480px;
  margin: 0 auto;
}

.lang-wrap {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
}

.lang-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  font-size: 14px;
  font-weight: 600;
}

.lang-box button {
  background: none;
  border: none;
  color: white;
  padding: 4px 12px;
  cursor: pointer;
  font-weight: 600;
}

.lang-box button.active {
  background: white;
  color: #c41e35;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
  margin-bottom: 8px;
}

.logo-wrap img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.logo-wrap h1 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 2px;
}

.invoice {
  padding: 20px 24px 0;
  font-size: 14px;
}

.invoice div {
  margin-bottom: 4px;
}

.spacer {
  flex: 0.6;
}

.input-section {
  padding: 0 8px 8px;
}

.input-section .label {
  text-align: center;
  font-size: 14px;
  margin-bottom: 6px;
}

.digits {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.digit-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.digit-group .sep {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 4px;
  font-size: 14px;
}

.digit-input {
  width: 23px;
  height: 28px;
  border-radius: 3px;
  background: white;
  color: #1a1a1a;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  border: none;
  outline: none;
}

.pin-input {
  width: 36px;
  height: 36px;
  border-radius: 3px;
  background: white;
  color: #1a1a1a;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  border: none;
  outline: none;
}

.pin-row {
  gap: 8px;
}

.terms {
  text-align: center;
  font-size: 11px;
  margin-top: 8px;
  padding: 0 24px;
}

.btn-row {
  display: flex;
  justify-content: space-around;
  padding: 8px 24px 12px;
}

.btn-white {
  background: white;
  color: #c41e35;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 40px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
}

.bottom-logo {
  display: flex;
  justify-content: center;
  padding-bottom: 20px;
  margin-top: 4px;
}

.bottom-logo img {
  height: 56px;
  object-fit: contain;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay p {
  color: white;
  font-size: 14px;
}

.loading-overlay .small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  padding: 0 32px;
  text-align: center;
}

/* Admin */
.admin-body {
  background: #f5f5f5;
  min-height: 100vh;
  padding: 12px;
  font-family: sans-serif;
}

.admin-wrap {
  max-width: 1024px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 8px;
}

.admin-header h1 {
  font-size: 20px;
  font-weight: bold;
  color: #1a1a1a;
}

.admin-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.amount-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.amount-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-size: 14px;
}

.btn-primary {
  background: #c41e35;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary {
  background: #e5e5e5;
  color: #1a1a1a;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.sub-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.sub-card .time {
  font-size: 10px;
  color: #737373;
  margin-bottom: 8px;
}

.sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
}

.sub-row .label {
  font-size: 12px;
  color: #737373;
}

.sub-row .value {
  font-family: monospace;
  font-size: 14px;
}

.sub-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.muted-italic {
  font-size: 12px;
  color: #737373;
  font-style: italic;
}

.empty {
  padding: 24px;
  text-align: center;
  color: #737373;
  font-size: 14px;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.login-wrap {
  max-width: 360px;
  margin: 80px auto;
  padding: 24px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-wrap h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

.login-wrap input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

.login-wrap button {
  width: 100%;
}

.error {
  color: #c41e35;
  font-size: 13px;
  margin-bottom: 12px;
}