body {
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
  padding: 0;
  width: 400px;
  background: #f7fafd;
  color: #222;
  position: relative;
  max-width: 480px;
  min-width: 280px;
  margin: 0 auto;
  box-sizing: border-box;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
h2 {
  text-align: center;
  margin: 18px 0 10px 0;
  font-size: 1.3em;
  color: #2d7a46;
  letter-spacing: 1px;
  padding: 0 8px;
}
.input-section, .list-section, .file-actions, .scan-actions, .counters, #log, .progress-container, .dup-info, .topup-token-bar {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  margin: 10px 16px;
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}
.input-section {
  margin-bottom: 0;
}
.input-actions, .list-actions, .file-actions, .scan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
  justify-content: flex-start;
}
.input-actions button, .file-actions button, .scan-actions button {
  background: #2d7a46;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.98em;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 120px;
  flex: 1 1 120px;
  margin-bottom: 6px;
}
.input-actions button:hover,
.file-actions button:hover,
.scan-actions button:hover {
  background: #226336;
}
#inputUsernames {
  width: 100%;
  resize: vertical;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  padding: 7px;
  font-size: 1em;
  background: #f8fafc;
}
#usernameList {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 1em;
  height: 120px;
  margin-bottom: 0;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  box-sizing: border-box;
  padding: 8px 10px;
  resize: vertical;
}
.list-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  width: 100%;
}
.list-actions label {
  font-size: 0.98em;
  color: #555;
  margin-right: 2px;
}
.list-actions select {
  border-radius: 5px;
  border: 1px solid #d1d5db;
  padding: 4px 10px;
  font-size: 1em;
  background: #f8fafc;
  min-width: 90px;
}
.counters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 0 6px;
  margin: 12px 0 8px 0;
  width: 100%;
  box-sizing: border-box;
}
.token-balance {
  font-size: 1.08em;
  font-weight: bold;
  color: #000000;
  background: linear-gradient(90deg, #ffffff 60%, #ffffff 100%);
  border-radius: 7px;
  padding: 7px 22px;
  min-width: 90px;
  max-width: 100%;
  padding: 7px 10px;
  font-size: 1em;
  margin-right: 0;
  margin-bottom: 6px;
  word-break: break-all;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(45,122,70,0.10);
  letter-spacing: 0.5px;
  margin-right: 12px;
}
.hidden {
  display: none !important;
}
.counter {
  min-width: 110px;
  font-size: 1em;
  padding: 7px 12px;
  border-radius: 6px;
  background: #f7f7f7;
  margin: 0;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #e0e0e0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}
.counter.disabled { color: #b22222; border-left: 4px solid #b22222; }
.counter.available { color: #2d7a46; border-left: 4px solid #2d7a46; }
.counter.registered { color: #1e90ff; border-left: 4px solid #1e90ff; }
.counter.error { color: #e67e22; border-left: 4px solid #e67e22; }
#log.log {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: 0.98em;
  padding: 10px 10px;
  margin: 12px 0 12px 0;
  border-radius: 12px;
  border: 1.5px solid #e0e4ea;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
  background: #f8fafc;
  color: #222;
  letter-spacing: 0.02em;
  transition: border 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  height: 110px;
  overflow-y: auto;
  white-space: pre-wrap;
}
#log.log:focus, #log.log:hover {
  border: 1.5px solid #2d7a46;
  box-shadow: 0 4px 16px rgba(45,122,70,0.10);
  background: #f3f6fa;
}
body.dark-mode #log.log {
  background: #23272e;
  color: #eee;
  border: 1.5px solid #444;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
}
body.dark-mode #log.log:focus, body.dark-mode #log.log:hover {
  border: 1.5px solid #4caf50;
  background: #23272e;
  box-shadow: 0 4px 16px rgba(76,175,80,0.10);
}
footer {
  text-align: center;
  margin: 10px 0 8px 0;
  font-size: 0.97em;
  color: #888;
  background: none;
  font-size: 0.95em;
  padding: 0 8px;
  margin: 10px 0 8px 0;
  word-break: break-word;
  flex-shrink: 0;
  margin-top: auto;
}
.footer-text {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.scan-status {
  margin: 0 0 10px 0;
  padding: 10px 0;
  text-align: center;
  font-size: 1.08em;
  font-weight: 600;
  border-radius: 8px;
  background: #f3f6fa;
  color: #2d7a46;
  letter-spacing: 1px;
  min-height: 28px;
  box-shadow: 0 1px 4px rgba(44,62,80,0.07);
  border: 1.5px solid #e0e4ea;
}
.scan-status.scanning {
  color: #fff;
  background: #2d7a46;
  border-color: #2d7a46;
}
.scan-status.stopped {
  color: #fff;
  background: #b22222;
  border-color: #b22222;
}
.scan-status.finished {
  color: #fff;
  background: #226336;
  border-color: #226336;
}
.scan-status.idle {
  color: #888;
  background: #f3f6fa;
  border-color: #e0e4ea;
}
.dup-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px 0;
  width: 100%;
  box-sizing: border-box;
}
.dup-info span {
  font-size: 0.98em;
  color: #888;
}
#searchBox {
  flex: 1;
  border-radius: 5px;
  border: 1px solid #d1d5db;
  padding: 4px 10px;
  font-size: 1em;
  background: #f8fafc;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-left: 8px;
}
.duplicate {
  background: #ffe0e0 !important;
  color: #b22222 !important;
}
body.dark-mode {
  background: #23272e;
  color: #eee;
}
body.dark-mode .input-section,
body.dark-mode .list-section,
body.dark-mode .file-actions,
body.dark-mode .scan-actions,
body.dark-mode .counters,
body.dark-mode #log,
body.dark-mode .progress-container {
  background: #2d313a;
  color: #eee;
}
body.dark-mode .progress-bar {
  background: #4caf50;
  color: #fff;
}
body.dark-mode #searchBox {
  background: #23272e;
  color: #eee;
  border: 1px solid #444;
}
body.dark-mode .duplicate {
  background: #6d2323 !important;
  color: #fff !important;
}
.login-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
  margin: 18px 0 0 0;
}
.login-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(44,62,80,0.10);
  padding: 28px 28px 18px 28px;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 13px;
  max-width: 340px;
  min-width: 0;
  margin: 0 auto;
  padding: 18px 8px 12px 8px;
  box-sizing: border-box;
  margin-bottom: 0;
}
.login-title {
  font-size: 1.18em;
  color: #2d7a46;
  font-weight: 600;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.login-card input[type="email"],
.login-card input[type="text"],
.login-card input[type="password"] {
  border-radius: 7px;
  border: 1px solid #d1d5db;
  padding: 8px 10px;
  font-size: 1em;
  background: #f8fafc;
  margin-bottom: 2px;
}
.login-card button {
  background: #2d7a46;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px 0;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}
.login-card button:hover {
  background: #226336;
}
.login-msg {
  min-height: 22px;
  color: #b22222;
  text-align: center;
  font-size: 0.98em;
  margin-top: 2px;
}
.login-hint {
  text-align: center;
  font-size: 0.97em;
  color: #888;
  margin-top: 8px;
}
body.dark-mode .login-card {
  background: #23272e;
  color: #eee;
}
body.dark-mode .login-title {
  color: #4caf50;
}
body.dark-mode .login-card input[type="email"],
body.dark-mode .login-card input[type="text"],
body.dark-mode .login-card input[type="password"] {
  background: #23272e;
  color: #eee;
  border: 1px solid #444;
}
body.dark-mode .login-card button {
  background: #4caf50;
  color: #fff;
}
body.dark-mode .login-card button:hover {
  background: #226336;
}
body.dark-mode .login-msg {
  color: #ffbaba;
}
.register-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 340px;
  margin: 18px 0 0 0;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 16px 0 16px;
  min-height: 36px;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0 0;
  padding: 0 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
#logoutContainer {

  display: flex;
  align-items: center;
  min-width: 90px;
  justify-content: flex-end;
}
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  flex: 1;
  padding-right: 48px;
  box-sizing: border-box;
  height: 38px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.toggle-password {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  margin: auto 0;
  height: 38px;
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: #222;
  font-size: 1.25em;
  cursor: pointer;
  outline: none;
  z-index: 2;
  transition: color 0.15s;
}
.toggle-password i {
  pointer-events: none;
}
.toggle-password:hover,
.toggle-password:focus {
  color: #000;
  background: none;
  box-shadow: none;
}
.toggle-password-text {
  position: absolute;
  right: 10px;
  top: 0;
  bottom: 0;
  margin: auto 0;
  height: 24px;
  display: flex;
  align-items: center;
  font-size: 0.98em;
  color: #2d7a46;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 4px;
  background: #f3f6fa;
  transition: background 0.15s, color 0.15s;
}
.toggle-password-text:hover,
.toggle-password-text:focus {
  background: #e0e4ea;
  color: #000;
}
.topup-token-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 8px 0;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
}
.topup-btn {
  background: #f7b731;
  color: #222;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-weight: 600;
  font-size: 0.97em;
  margin: 0 0 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(44,62,80,0.07);
  transition: background 0.18s, color 0.18s;
  min-width: 0;
  height: 32px;
}
.topup-btn i {
  margin-right: 4px;
  font-size: 1em;
}
.topup-btn:hover {
  background: #f5a623;
  color: #fff;
}

button,
input[type="button"],
input[type="submit"] {
  transition: transform 0.08s cubic-bezier(.4,0,.2,1), box-shadow 0.18s;
}

button:active,
input[type="button"]:active,
input[type="submit"]:active {
  transform: scale(0.96);
  box-shadow: 0 1px 2px rgba(44,62,80,0.10);
}

@media (max-width: 500px) {
  .counters {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .token-balance {
    padding: 6px 10px;
    font-size: 1em;
    margin-right: 0;
    margin-bottom: 6px;
  }
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin: 8px 8px 0 8px;
  }
}



body {

  max-width: 480px;
  min-width: 280px;
  margin: 0 auto;
  box-sizing: border-box;
}


.input-section, .list-section, .file-actions, .scan-actions, .counters, #log, .progress-container, .dup-info, .topup-token-bar {
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
}


h2 {

  font-size: 1.3em;
  padding: 0 8px;
}


#usernameList {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 1em;
  height: 120px;
  box-sizing: border-box;
}


.input-actions, .list-actions, .file-actions, .scan-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.file-actions, .scan-actions {
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.file-actions button, .scan-actions button {
  min-width: 120px;
  flex: 1 1 120px;
  margin-bottom: 6px;
}


.counters {
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 0 6px;
}


#log.log {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: 0.98em;
  padding: 10px 8px;
  margin: 12px 0 12px 0;
}


.progress-container {
  width: 100%;
  min-width: 0;
  margin: 0 0 10px 0;
}


.modal-topup, #modalMessage {
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
}
.modal-content {
  min-width: 220px;
  max-width: 98vw;
  padding: 18px 8px 12px 8px;
  font-size: 1em;
}


.login-card {
  width: 100%;
  max-width: 340px;
  min-width: 0;
  margin: 0 auto;
  padding: 18px 8px 12px 8px;
  box-sizing: border-box;
}


.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}


.dup-info {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin: 0 0 10px 0;
}
#searchBox {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


.top-bar {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0 0;
  padding: 0 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}


.token-balance {
  min-width: 90px;
  max-width: 100%;
  padding: 7px 10px;
  font-size: 1em;
  margin-right: 0;
  margin-bottom: 6px;
  word-break: break-all;
  box-sizing: border-box;
}


footer {
  font-size: 0.95em;
  padding: 0 8px;
  margin: 10px 0 8px 0;
  word-break: break-word;
}


@media (max-width: 600px) {
  body {
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    padding: 0;
  }
  .login-card, .modal-content {
    max-width: 98vw;
    min-width: 0;
    padding: 12px 4vw 10px 4vw;
  }
  .input-section, .list-section, .file-actions, .scan-actions, .counters, #log, .progress-container, .dup-info, .topup-token-bar {
    margin: 8px 0;
    padding: 8px 2vw;
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
  }
  .top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 8px 0 0 0;
    padding: 0 2vw;
  }
  .token-balance {
    margin-bottom: 4px;
    padding: 7px 6px;
    font-size: 0.98em;
  }
  #log.log {
    font-size: 0.95em;
    padding: 8px 2vw;
  }
  .file-actions button, .scan-actions button {
    min-width: 90px;
    font-size: 0.97em;
    padding: 6px 8px;
  }
  .counter {
    min-width: 90px;
    font-size: 0.97em;
    padding: 6px 8px;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  .login-card, .modal-content {
    padding: 8px 2vw 8px 2vw;
  }
  .input-section, .list-section, .file-actions, .scan-actions, .counters, #log, .progress-container, .dup-info, .topup-token-bar {
    padding: 6px 1vw;
  }
  #log.log {
    font-size: 0.92em;
    padding: 6px 1vw;
  }
}




.list-section {
  margin: 14px 0 8px 0;
  padding: 14px 12px 10px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#usernameList {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  font-size: 1em;
  height: 120px;
  margin-bottom: 0;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #f8fafc;
  box-sizing: border-box;
  padding: 8px 10px;
  resize: vertical;
}

.list-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  width: 100%;
}

.list-actions label {
  font-size: 0.98em;
  color: #555;
  margin-right: 2px;
}

.list-actions select {
  border-radius: 5px;
  border: 1px solid #d1d5db;
  padding: 4px 10px;
  font-size: 1em;
  background: #f8fafc;
  min-width: 90px;
}


.file-actions {
  margin: 10px 0 8px 0;
  padding: 10px 12px 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.file-actions button {
  min-width: 120px;
  flex: 1 1 120px;
  margin-bottom: 0;
  font-size: 0.99em;
  padding: 7px 10px;
  margin-right: 0;
}


.scan-actions {
  margin: 10px 0 8px 0;
  padding: 10px 12px 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.scan-actions button {
  min-width: 120px;
  flex: 1 1 120px;
  margin-bottom: 0;
  font-size: 0.99em;
  padding: 7px 10px;
  margin-right: 0;
}


.counters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 0 6px;
  margin: 12px 0 8px 0;
  width: 100%;
  box-sizing: border-box;
}

.counter {
  min-width: 110px;
  font-size: 1em;
  padding: 7px 12px;
  border-radius: 6px;
  background: #f7f7f7;
  margin: 0;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  border: 1px solid #e0e0e0;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 7px;
}


.progress-container {
  margin: 10px 0 10px 0;
  background: #e0e4ea;
  border-radius: 8px;
  height: 14px;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  box-shadow: none;
  display: flex;
  align-items: center;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2d7a46 60%, #4caf50 100%);
  color: #fff;
  text-align: right;
  font-weight: 600;
  font-size: 0.95em;
  border-radius: 8px;
  transition: width 0.4s cubic-bezier(.4,0,.2,1), background 0.3s;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  box-shadow: none;
  letter-spacing: 0.2px;
}


.scan-status {
  margin: 0 0 6px 0;
  padding: 3px 0 2px 0;
  text-align: center;
  font-size: 1em;
  font-weight: 600;
  border-radius: 6px;
  background: #f3f6fa;
  color: #2d7a46;
  letter-spacing: 0.5px;
  min-height: unset;
  box-shadow: none;
  border: none;
  line-height: 1.2;
  height: auto;
}
.scan-status.scanning {
  color: #fff;
  background: #2d7a46;
}
.scan-status.stopped {
  color: #fff;
  background: #b22222;
}
.scan-status.finished {
  color: #fff;
  background: #226336;
}
.scan-status.idle {
  color: #888;
  background: #f3f6fa;
}


.file-actions,
.scan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  padding: 10px 12px 8px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.file-actions button,
.scan-actions button {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 160px;
  font-size: 0.97em;
  padding: 7px 16px;
  margin-bottom: 0;
  border-radius: 7px;
  margin-right: 0;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  border: none;
  background: #2d7a46;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(44,62,80,0.07);
  outline: none;
}

.file-actions button i,
.scan-actions button i {
  margin-right: 6px;
}

.scan-actions button#btnDarkMode {
  min-width: 38px;
  max-width: 38px;
  padding: 7px 0;
  font-size: 1.15em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f6fa;
  color: #2d7a46;
  border: 1.5px solid #e0e4ea;
  margin-left: auto;
  margin-right: 0;
  box-shadow: none;
  border-radius: 50%;
  aspect-ratio: 1/1;
  font-weight: bold;
}

.scan-actions button#btnDarkMode:hover,
.scan-actions button#btnDarkMode:focus {
  background: #e0e4ea;
  color: #226336;
  border-color: #2d7a46;
}

.scan-actions button:not(#btnDarkMode):hover,
.file-actions button:hover {
  background: #226336;
  color: #fff;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
}

.scan-actions button:disabled,
.file-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #bdbdbd !important;
  color: #fff !important;
  box-shadow: none;
}


#log.log {
  display: block !important;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  font-size: 0.98em;
  padding: 10px 10px;
  margin: 12px 0 12px 0;
  border-radius: 12px;
  border: 1.5px solid #e0e4ea;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
  background: #f8fafc;
  color: #222;
  letter-spacing: 0.02em;
  transition: border 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  height: 110px;
  overflow-y: auto;
  white-space: pre-wrap;
}


body.show-auth #log.log {
  display: none !important;
}


.list-section {
  display: flex !important;
  flex-direction: column;
  margin: 14px 0 8px 0;
  padding: 14px 12px 10px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(44, 62, 80, 0.07);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}


.topup-token-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin: 0 0 8px 0;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  min-height: 0;
  width: 100%;
  max-width: 100%;
}

.topup-btn {
  background: #f7b731;
  color: #222;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-weight: 600;
  font-size: 0.97em;
  margin: 0 0 0 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(44,62,80,0.07);
  transition: background 0.18s, color 0.18s;
  min-width: 0;
  height: 32px;
}

.topup-btn i {
  margin-right: 4px;
  font-size: 1em;
}

.topup-btn:hover {
  background: #f5a623;
  color: #fff;
}


@media (max-width: 600px) {
  .topup-btn {
    font-size: 0.95em;
    padding: 5px 10px;
    height: 30px;
  }
  .topup-token-bar {
    margin: 0 0 6px 0;
    padding: 0;
  }
}


.modal-topup, #modalMessage {
  position: fixed !important;
  z-index: 99999 !important;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  background: rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}


.modal-content {
  position: relative;
  z-index: 100000 !important;
  background: #fff;
  border-radius: 14px;
  padding: 18px 8px 12px 8px;
  min-width: 220px;
  max-width: 98vw;
  font-size: 1em;
  box-shadow: 0 4px 24px rgba(44,62,80,0.18);
  text-align: center;
  overflow: visible;
}


.close-modal {
  position: absolute;
  right: 18px;
  top: 14px;
  font-size: 1.5em;
  color: #888;
  cursor: pointer;
  font-weight: bold;
  transition: color 0.15s;
  z-index: 100001;
  background: none;
  border: none;
  outline: none;
  padding: 0;
  line-height: 1;
  display: inline-block;
}

.close-modal:hover {
  color: #b22222;
}


.topup-options {
  display: flex;
  gap: 14px;
  margin: 18px 0 8px 0;
  justify-content: center;
}

.manual-btn, .qris-btn {
  background: #2d7a46;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 9px 22px;
  font-size: 1.08em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(44,62,80,0.07);
  transition: background 0.18s;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.manual-btn:hover {
  background: #226336;
}

.qris-btn {
  background: #bbb;
  color: #fff;
  cursor: not-allowed;
}

.topup-btn:disabled, .manual-btn:disabled, .qris-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


#topupAmount {
  width: 110px;
  font-size: 1.15em;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1px solid #d1d5db;
  text-align: center;
  margin-bottom: 2px;
  background: #f8fafc;
  color: #222;
  box-shadow: 0 1px 2px rgba(44,62,80,0.07);
  transition: border 0.18s, box-shadow 0.18s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

#topupAmount:focus {
  border: 1.5px solid #2d7a46;
  background: #f3f6fa;
  box-shadow: 0 2px 8px rgba(45,122,70,0.10);
}

body.dark-mode #topupAmount {
  background: #23272e;
  color: #eee;
  border: 1px solid #444;
}

body.dark-mode #topupAmount:focus {
  border: 1.5px solid #4caf50;
  background: #23272e;
  box-shadow: 0 2px 8px rgba(76,175,80,0.10);
}


#topupAmount::-webkit-inner-spin-button,
#topupAmount::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#topupAmount[type=number] {
  appearance: textfield;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}


body.show-auth .list-section {
  display: none !important;
}


.login-card .g-recaptcha {
  display: flex;
  justify-content: center;
  margin: 10px 0 0 0;
}


@media (max-width: 600px) {
  .login-card .g-recaptcha {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
  }
}


.g-recaptcha {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}


.lang-dropdown {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #f5f5f5 url("data:image/svg+xml;utf8,<svg fill='gray' height='16' viewBox='0 0 20 20' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7.293 8.293a1 1 0 011.414 0L10 9.586l1.293-1.293a1 1 0 111.414 1.414l-2 2a1 1 0 01-1.414 0l-2-2a1 1 0 010-1.414z'/></svg>") no-repeat right 0.7em center/1.2em;
  border: 1px solid #cfd8dc;
  border-radius: 7px;
  padding: 6px 32px 6px 12px;
  font-size: 1em;
  color: #2d7a46;
  font-weight: 600;
  min-width: 110px;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(44,62,80,0.07);
}

.lang-dropdown:focus {
  outline: none;
  border: 1.5px solid #2d7a46;
  box-shadow: 0 2px 8px rgba(44,62,80,0.13);
}

@media (max-width: 600px) {
  .lang-dropdown {
    font-size: 0.98em;
    min-width: 90px;
    padding: 6px 28px 6px 10px;
  }
  .top-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
}
